Backend\Modules\Blog\Actions\Edit::parse PHP Method

parse() protected method

Parse the form
protected parse ( )
    protected function parse()
    {
        parent::parse();
        // get url
        $url = BackendModel::getURLForBlock($this->URL->getModule(), 'detail');
        $url404 = BackendModel::getURL(404);
        // parse additional variables
        if ($url404 != $url) {
            $this->tpl->assign('detailURL', SITE_URL . $url);
        }
        // fetch proper slug
        $this->record['url'] = $this->meta->getURL();
        // assign the active record and additional variables
        $this->tpl->assign('item', $this->record);
        $this->tpl->assign('status', BL::lbl(\SpoonFilter::ucfirst($this->record['status'])));
        // assign revisions-datagrid
        $this->tpl->assign('revisions', $this->dgRevisions->getNumResults() != 0 ? $this->dgRevisions->getContent() : false);
        $this->tpl->assign('drafts', $this->dgDrafts->getNumResults() != 0 ? $this->dgDrafts->getContent() : false);
        $this->tpl->assign('imageIsAllowed', $this->imageIsAllowed);
        // assign category
        if ($this->categoryId !== null) {
            $this->tpl->assign('categoryId', $this->categoryId);
        }
    }