Насколько я понимаю, OPTIONS запросы Yii , вообще, должен разруливать самостоятельно.
['cities', function ($attribute, $params, $validator) {
if(is_array($this->$attribute)) {
if(empty($this->$attribute)) {
$this->addError($attribute, 'The array shouldnt be empty');
}
foreach($this->$attribute as $item) {
if(!is_int($item)) {
$this->addError($attribute, 'The array contains not an integer values');
break;
}
}
}
}],
<?php $text = 'Вот сюда и нужно вывести динамически текст';
?>
<?= Html::tag('h1', Html::encode($this->title), ['class' => 'flex-column logo--title']) ?>
<span><?= $text ?></span>
'components' => [
'request' => [
'parsers' => [
'application/json' => \yii\web\JsonParser::class,
]
],
]
->where(['city' => $cities])->all();
Note that the array format of where() is designed to match columns to values instead of columns to columns, so the following would not work as expected:
['post.author_id' => 'user.id'], it would match the post.author_id column value against the string 'user.id'.
It is recommended to use the string syntax here which is more suited for a join:
'post.author_id = user.id'
The key that identifies the JS script file. If null, it will use $url as the key. If two JS files are registered with the same key at the same position, the latter will overwrite the former. Note that position option takes precedence, thus files registered with the same key, but different position option will not override each other.