/**
* @param ActiveForm $form
*/
public function renderForm(ActiveForm $form)
{
$formArray = static::mainForm();
foreach ($formArray as $attribute => $item) {
if (!is_array($item)) {
echo $item;
} else {
$fieldType = $item['attribute']['type'];
unset($item['attribute']['type']);
$inputParams = $item['attribute'];
echo call_user_func_array(
[$form->field($this, $attribute, (isset($item['options']) ?: [])), $fieldType],
(!empty($inputParams) ? $inputParams : [])
);
}
}
}
return [
'type' => [
'attribute' => [
'type' => 'dropDownList',
'items' => self::getTypesList()
]
],
];
<?php $form = ActiveForm::begin([
'id' => 'create-form',
'options' => ['class' => 'form-horizontal', 'enctype' => 'multipart/form-data'],
'fieldConfig' => [
'template' => "{label}\n<div class=\"col-lg-7\">{input}<div>{error}</div></div>",
'labelOptions' => ['class' => 'col-lg-3 control-label']
]
]);
$model->renderForm($form);
?>
2. Слежу через Gearman UI и вижу там что все воркеры запущены