?> <?php echo $form->field($model, 'code')->textInput(); ?> <?php echo $form->field($model, 'data_type')->dropDownList(CatalogAttributes::datatypeList()); ?> <?php echo $form->field($model, 'filter_type')->dropDownList(CatalogAttributes::filterList()); ?> <?php echo $form->field($model, 'category_id')->dropDownList(ArrayHelper::map(\app\modules\catalog\models\CatalogCategoriesSearch::find()->all(), 'id', 'title'), ['prompt' => ' -- ' . \Yii::t('app', 'Select Category') . ' -- ', 'disabled' => !$model->isNewRecord]); ?> <?php echo $form->field($model, 'measure')->textInput(); ?> <?php echo $form->field($model, 'ordering')->textInput(); ?> <?php echo $form->field($model, 'disabled')->checkBox(); ?> <div class="form-group">
/** * Lists all CatalogCategories models. * @return mixed */ public function actionIndex() { $searchModel = new CatalogCategoriesSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); }