skeeks\cms\relatedProperties\propertyTypes\PropertyTypeList::fieldElements PHP Method

fieldElements() public static method

public static fieldElements ( )
    public static function fieldElements()
    {
        return [self::FIELD_ELEMENT_SELECT => \Yii::t('skeeks/cms', 'Combobox') . ' (select)', self::FIELD_ELEMENT_SELECT_MULTI => \Yii::t('skeeks/cms', 'Combobox') . ' (select multiple)', self::FIELD_ELEMENT_RADIO_LIST => \Yii::t('skeeks/cms', 'Radio Buttons (selecting one value)'), self::FIELD_ELEMENT_CHECKBOX_LIST => \Yii::t('skeeks/cms', 'Checkbox List'), self::FIELD_ELEMENT_LISTBOX => \Yii::t('skeeks/cms', 'ListBox'), self::FIELD_ELEMENT_LISTBOX_MULTI => \Yii::t('skeeks/cms', 'ListBox Multi')];
    }

Usage Example

Example #1
1
 /**
  * @return string
  */
 public function renderConfigForm(ActiveForm $activeForm)
 {
     echo $activeForm->fieldSelect($this, 'fieldElement', \skeeks\cms\relatedProperties\propertyTypes\PropertyTypeList::fieldElements());
     echo \skeeks\cms\modules\admin\widgets\RelatedModelsGrid::widget(['label' => \Yii::t('skeeks/cms', "Values for list"), 'hint' => \Yii::t('skeeks/cms', "You can snap to the element number of properties, and set the value to them"), 'parentModel' => $this->property, 'relation' => ['property_id' => 'id'], 'controllerRoute' => $this->enumRoute, 'gridViewOptions' => ['sortable' => true, 'columns' => [['attribute' => 'id', 'enableSorting' => false], ['attribute' => 'code', 'enableSorting' => false], ['attribute' => 'value', 'enableSorting' => false], ['attribute' => 'priority', 'enableSorting' => false], ['class' => \skeeks\cms\grid\BooleanColumn::className(), 'attribute' => 'def', 'enableSorting' => false]]]]);
 }
All Usage Examples Of skeeks\cms\relatedProperties\propertyTypes\PropertyTypeList::fieldElements