Answer the question
In order to leave comments, you need to log in
Why does phpStorm strike out "className" syntax in yii2?
Greetings, I understand that some functions have changed due to the update of yii2, and ::className()
here is an example of what I mean:
The documentation advises to change to ::class()
But I do it
<?= $form->field($model, 'text')->widget(Widget::class(), [
'settings' => [
'lang' => 'ru',
'uploadOnlyImage' => true,
'validatorOptions' => ['maxSize' => 40000],
'minHeight' => 200,
'plugins' => [
'imagemanager',
],
'imageUpload' => Url::to(['/admin/news/image-upload']),
'imageManagerJson' => Url::to(['/admin/news/images-get']),
]
]); ?>
syntax error, unexpected '('
1. in C:\Users\acer\OSPanel\domains\medicalyii2\modules\admin\views\news\_form.php at line
/* @var $form yii\widgets\ActiveForm */
?>
<div class="user-form">
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'text')->widget(Widget::class(), [
'settings' => [
'lang' => 'ru',
'uploadOnlyImage' => true,
'validatorOptions' => ['maxSize' => 40000],
'minHeight' => 200,
'plugins' => [
'imagemanager',
],
'imageUpload' => Url::to(['/admin/news/image-upload']),
2. yii\base\ErrorHandler::handleFatalError()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question