components/actions/Action.php
public function init()
    {
        $this->query = $this->controller->query;
        if ($this->query) {
            $modelClass = Yii::createObject($this->query->modelClass);
            $this->modelClass = $modelClass;
            $this->tableName = $modelClass::tableName();
        }

        parent::init(); // TODO: Change the autogenerated stub
    }
public function init()
    {
        $this->query = $this->controller->query;
        if ($this->query) {
            $modelClass = Yii::createObject($this->query->modelClass);
            $this->modelClass = $modelClass;
            $this->tableName = $modelClass::tableName();
        }

        parent::init(); // TODO: Change the autogenerated stub
    }
public function init ( ) { $ this -> query = $ this -> controller -> query ; if ( $ this -> query ) { $ modelClass = Yii :: createObject ( $ this -> query -> modelClass ) ; $ this -> modelClass = $ modelClass ; $ this -> tableName = $ modelClass :: tableName ( ) ; } parent :: init ( ) ; // TODO: Change the autogenerated stub }
Init query and modelClass
@throws InvalidConfigException
Init query and modelClass