Answer the question
In order to leave comments, you need to log in
Yii + PhpStorm = autocomplete, how to set up?
Goodnight!
PhpStorm is configured to work with Yii, all methods are picked up, but when scopes are set in the model, they are not supplemented when requested from the controller:
Model
....
public function scopes()
{
return array(
// slider
'mainpage' => array(
'condition' => 'mainpage=1',
'select' => 'obj_id,lat,lon,head,idname,description, finished,address,finished,tip',
'order' => 'ord'
),
'commercial' => array(
'condition' => 'commercial=1'
),
'noncommercial' => array(
'condition' => 'commercial=0'
),
);
}
......
Controller
$objects = Object::model()->noncommercial()->findAll($criteria);
Answer the question
In order to leave comments, you need to log in
manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDoc...
/**
* @method Object mainpage()
*/
class Object
{
...
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question