skeeks\cms\controllers\TreeController::actionView PHP Méthode

actionView() public méthode

public actionView ( )
    public function actionView()
    {
        if (!$this->model) {
            throw new NotFoundHttpException(\Yii::t('skeeks/cms', 'Page not found'));
        }
        \Yii::$app->cms->setCurrentTree($this->model);
        \Yii::$app->breadcrumbs->setPartsByTree($this->model);
        if ($this->model->redirect || $this->model->redirect_tree_id) {
            return \Yii::$app->response->redirect($this->model->url, $this->model->redirect_code);
        }
        $viewFile = $this->action->id;
        //������� ��������� view ��� �������� ���� ��������
        if ($this->model) {
            //���� � ������� ������ ������������ ������, �������� ���, ����� ������ ���� ��������
            if ($this->model->view_file) {
                $viewFile = $this->model->view_file;
            } else {
                if ($this->model->treeType) {
                    if ($this->model->treeType->viewFile) {
                        $viewFile = $this->model->treeType->viewFile;
                    } else {
                        $viewFile = $this->model->treeType->code;
                    }
                }
            }
        }
        $this->_initStandartMetaData();
        return $this->render($viewFile, ['model' => $this->model]);
    }