Exemplo n.º 1
0
?>

    <?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">
Exemplo n.º 2
0
 /**
  * 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]);
 }