beginForm(isset($model) ? "/admin/menu/edit/" . $model->id : "/admin/menu"); $form->field(class: \itguild\forms\inputs\Select::class, name: "parent_id", params: [ 'class' => "form-control", 'value' => $model->parent_id ?? '' ]) ->setLabel("Родительский пункт меню") ->setOptions(\app\services\MenuService::createLabelArr()) ->render(); $form->field(class: \itguild\forms\inputs\TextInput::class, name: "icon_file", params: [ 'class' => "form-control", 'value' => $model->icon_file ?? '' ]) ->setLabel("Путь к иконке") ->render(); $form->field(class: \itguild\forms\inputs\TextInput::class, name: "icon_font", params: [ 'class' => "form-control", 'value' => $model->icon_font ?? '' ]) ->setLabel("Иконка") ->render(); $form->field(class: \itguild\forms\inputs\TextInput::class, name: "label", params: [ 'class' => "form-control", 'value' => $model->label ?? '' ]) ->setLabel("Заголовок") ->render(); $form->field(class: \itguild\forms\inputs\TextInput::class, name: "url", params: [ 'class' => "form-control", 'value' => $model->url ?? '' ]) ->setLabel("URL") ->render(); $form->field(class: \itguild\forms\inputs\Select::class, name: "status", params: [ 'class' => "form-control", 'value' => $model->status ?? '1' ]) ->setLabel("Статус") ->setOptions(Menu::getStatus()) ->render(); ?>