コード例 #1
0
ファイル: widget.dict.php プロジェクト: umonkey/molinos-cms
 public static function getConfigOptions(Context $ctx)
 {
     $list = TypeNode::getDictionaries();
     if (empty($list)) {
         throw new ForbiddenException(t('Не определён ни один справочник.'));
     }
     return array('type' => array('type' => 'EnumControl', 'label' => t('Справочник'), 'required' => true, 'options' => $list));
 }
コード例 #2
0
ファイル: control.enum.php プロジェクト: umonkey/molinos-cms
 public function getExtraSettings()
 {
     $fields = array('dictionary' => array('type' => 'EnumControl', 'label' => t('Справочник'), 'options' => TypeNode::getDictionaries(), 'weight' => 4, 'default_label' => t('(не использовать)')));
     return $fields;
 }
コード例 #3
0
 /**
  * Дополнительные настройки поля.
  */
 public function getExtraSettings()
 {
     $fields = array('dictionary' => array('type' => 'EnumControl', 'label' => t('Справочник'), 'required' => true, 'options' => TypeNode::getDictionaries(), 'weight' => 4), 'mode' => array('type' => 'EnumControl', 'label' => t('Режим работы'), 'options' => array('select' => t('один — выпадающий список'), 'radio' => t('один — радио'), 'enter' => t('один — текстовое поле'), 'set' => t('много — галки')), 'required' => true), 'details' => array('type' => 'EnumControl', 'label' => t('Объём данных'), 'options' => array('less' => t('id + название'), 'more' => t('полный XML')), 'required' => true));
     return $fields;
 }