Closed ahmadfadlydziljalal closed 2 months ago
Can you please provide relative path of the view?
This is works, Yii2 displayed it, but still no success in click >> goto file
return $this->render('/company-service/_view_item_master_template_invoice_import', [
'model' => $model,
]);
We use standard basic template
, no structure directory modification.
Of course, it works in my test project. The first thing you need to try is to rebuild indexes. One option is to add a fake path in the plugin settings in the View section. It fires an index rebuild. Alternatively, you can probably use File > Invalidate caches > Mark downloaded shared indexes as broken.
If it does not help, you need to provide additional info. The code itself is not sufficient. Plugin search the view file in your directory structure. I need a path of the view and a path of the code calling render method.
Please provide additional info:
No Error. Please just create a new Yii2 Application, and test of them.
All tested in PhpStorm 2024.2.0.1
Thank you. Will take a look.
The reason why it is not working is that IDE does not know the type of $this. To make it work you need declare the type:
echo ListView::widget([
'itemView' => function ($model, $key, $index, $widget) {
/**
* @var \yii\web\View $this
*/
return $this->render('test', [
'model' => $model,
]);
},
]);
Consider this code:
In normal condition, when we click
_view_item_master_template_invoice_import
, it will be automatically open those file. But in this case, it`s not work.Please fixed it. I already subscribe this plugin in phpstorm
Thanks