Backend\Modules\Blog\Actions\Edit::execute PHP Метод

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

Execute the action
public execute ( )
    public function execute()
    {
        // get parameters
        $this->id = $this->getParameter('id', 'int');
        // does the item exists
        if ($this->id !== null && BackendBlogModel::exists($this->id)) {
            parent::execute();
            // set category id
            $this->categoryId = \SpoonFilter::getGetValue('category', null, null, 'int');
            if ($this->categoryId == 0) {
                $this->categoryId = null;
            }
            $this->getData();
            $this->loadDrafts();
            $this->loadRevisions();
            $this->loadForm();
            $this->validateForm();
            $this->parse();
            $this->display();
        } else {
            // no item found, throw an exception, because somebody is fucking with our URL
            $this->redirect(BackendModel::createURLForAction('Index') . '&error=non-existing');
        }
    }