<?php
use kartik\select2\Select2;
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use vova07\imperavi\Widget;
/* @var $this yii\web\View */
/* @var $model common\models\Blog */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="blog-form">
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'text')->widget(Widget::className(), [
'settings' => [
'lang' => 'ru',
'minHeight' => 200,
'formatting'=> ['p', 'blockquote', 'pre', 'h1', 'h2', 'h3', 'h4', 'h5'],
'plugins' => [
'clips',
'fullscreen'
]
]
]);
?>
<?= $form->field($model, 'url')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'status_id')->dropDownList(['off','on']) ?>
<?= $form->field($model, 'sort')->textInput() ?>
<?= $form->field($model, 'tags')->widget(Select2::classname(), [ // собственно ошибка
'data' => \yii\helpers\ArrayHelper::map(\common\models\Tag::find()->all(),'id','name'),
'language' => 'ru',
'options' => ['placeholder' => 'Выбрать таг...','multiple'=>true],
'pluginOptions' => [
'allowClear' => true
],
]);
?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
'kartik-v/yii2-krajee-base' =>
array (
'name' => 'kartik-v/yii2-krajee-base',
'version' => '9999999-dev',
'alias' =>
array (
'@kartik/base' => $vendorDir . '/kartik-v/yii2-krajee-base',
),
),
'kartik-v/yii2-widget-select2' =>
array (
'name' => 'kartik-v/yii2-widget-select2',
'version' => '9999999-dev',
'alias' =>
array (
'@kartik/select2' => $vendorDir . '/kartik-v/yii2-widget-select2',
),
),
'kartik-v/yii2-widget-alert' =>
array (
'name' => 'kartik-v/yii2-widget-alert',
'version' => '9999999-dev',
'alias' =>
array (
'@kartik/alert' => $vendorDir . '/kartik-v/yii2-widget-alert',
),
),