yupe\components\actions\IndexAction::run PHP Метод

run() публичный Метод

public run ( )
    public function run()
    {
        $modelClass = $this->modelClass;
        /* @var $model YModel */
        $model = new $modelClass($this->modelScenario);
        $model->unsetAttributes();
        if (($data = Yii::app()->request->getParam(get_class($model))) !== null) {
            $model->setAttributes($data);
        }
        $controller = $this->getController();
        if ($this->layout !== null) {
            $layout = $controller->layout;
            $controller->layout = is_callable($this->layout) ? call_user_func($this->layout, $model) : $this->layout;
        }
        $this->onBeforeRender($event = new CEvent($this));
        if (!$event->handled) {
            $controller->render(is_callable($this->view) ? call_user_func($this->view, $model) : $this->view, ['model' => $model]);
            $this->onAfterRender(new CEvent($this));
        }
        if ($this->layout !== null) {
            $controller->layout = $layout;
        }
    }