当前位置: 首页>>代码示例>>PHP>>正文


PHP cmsForm::addFieldsetToBeginning方法代码示例

本文整理汇总了PHP中cmsForm::addFieldsetToBeginning方法的典型用法代码示例。如果您正苦于以下问题:PHP cmsForm::addFieldsetToBeginning方法的具体用法?PHP cmsForm::addFieldsetToBeginning怎么用?PHP cmsForm::addFieldsetToBeginning使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cmsForm的用法示例。


在下文中一共展示了cmsForm::addFieldsetToBeginning方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getWidgetOptionsForm

 public static function getWidgetOptionsForm($widget_name, $controller_name = false, $options = false)
 {
     $widget_path = self::getWidgetPath($widget_name, $controller_name);
     $path = cmsConfig::get('system_path') . $widget_path;
     $form_file = $path . '/options.form.php';
     $form_name = 'widget' . ($controller_name ? "_{$controller_name}_" : '_') . "{$widget_name}_options";
     $form = cmsForm::getForm($form_file, $form_name, array($options));
     if (!$form) {
         $form = new cmsForm();
     }
     $form->is_tabbed = true;
     //
     // Опции внешнего вида
     //
     $design_fieldset_id = $form->addFieldset(LANG_DESIGN);
     $form->addField($design_fieldset_id, new fieldString('class_wrap', array('title' => LANG_CSS_CLASS_WRAP)));
     $form->addField($design_fieldset_id, new fieldString('class_title', array('title' => LANG_CSS_CLASS_TITLE)));
     $form->addField($design_fieldset_id, new fieldString('class', array('title' => LANG_CSS_CLASS_BODY)));
     $form->addField($design_fieldset_id, new fieldString('tpl_wrap', array('title' => LANG_WIDGET_WRAPPER_TPL, 'hint' => LANG_WIDGET_WRAPPER_TPL_HINT)));
     $form->addField($design_fieldset_id, new fieldString('tpl_body', array('title' => LANG_WIDGET_BODY_TPL, 'hint' => sprintf(LANG_WIDGET_BODY_TPL_HINT, $widget_path))));
     //
     // Опции доступа
     //
     $access_fieldset_id = $form->addFieldset(LANG_PERMISSIONS);
     // Показывать группам
     $form->addField($access_fieldset_id, new fieldListGroups('groups_view', array('title' => LANG_SHOW_TO_GROUPS, 'show_all' => true, 'show_guests' => true)));
     // Не показывать группам
     $form->addField($access_fieldset_id, new fieldListGroups('groups_hide', array('title' => LANG_HIDE_FOR_GROUPS, 'show_all' => false, 'show_guests' => true)));
     //
     // Опции заголовка
     //
     $title_fieldset_id = $form->addFieldsetToBeginning(LANG_BASIC_OPTIONS);
     // ID виджета
     $form->addField($title_fieldset_id, new fieldNumber('id', array('is_hidden' => true)));
     // Заголовок виджета
     $form->addField($title_fieldset_id, new fieldString('title', array('title' => LANG_TITLE, 'rules' => array(array('required'), array('min_length', 3), array('max_length', 128)))));
     // Флаг показа заголовка
     $form->addField($title_fieldset_id, new fieldCheckbox('is_title', array('title' => LANG_SHOW_TITLE, 'default' => true)));
     // Флаг объединения с предыдущим виджетом
     $form->addField($title_fieldset_id, new fieldCheckbox('is_tab_prev', array('title' => LANG_WIDGET_TAB_PREV)));
     // Ссылки в заголовке
     $form->addField($title_fieldset_id, new fieldText('links', array('title' => LANG_WIDGET_TITLE_LINKS, 'hint' => LANG_WIDGET_TITLE_LINKS_HINT)));
     return $form;
 }
开发者ID:asphix,项目名称:icms2,代码行数:44,代码来源:core.php


注:本文中的cmsForm::addFieldsetToBeginning方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。