當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。