Backend\Modules\Pages\Actions\Edit::parse PHP Метод

parse() защищенный Метод

Parse
protected parse ( )
    protected function parse()
    {
        parent::parse();
        // set
        $this->record['url'] = $this->meta->getURL();
        if ($this->id == 1) {
            $this->record['url'] = '';
        }
        // parse some variables
        $this->tpl->assign('item', $this->record);
        $this->tpl->assign('isGod', $this->isGod);
        $this->tpl->assign('templates', $this->templates);
        $this->tpl->assign('positions', $this->positions);
        $this->tpl->assign('extrasData', json_encode(BackendExtensionsModel::getExtrasData()));
        $this->tpl->assign('extrasById', json_encode(BackendExtensionsModel::getExtras()));
        $this->tpl->assign('prefixURL', rtrim(BackendPagesModel::getFullURL($this->record['parent_id']), '/'));
        $this->tpl->assign('formErrors', (string) $this->frm->getErrors());
        $this->tpl->assign('showTags', $this->showTags());
        // init var
        $showDelete = true;
        // has children?
        if (BackendPagesModel::getFirstChildId($this->record['id']) !== false) {
            $showDelete = false;
        }
        if (!$this->record['delete_allowed']) {
            $showDelete = false;
        }
        // allowed?
        if (!BackendAuthentication::isAllowedAction('Delete', $this->getModule())) {
            $showDelete = false;
        }
        // show delete button
        $this->tpl->assign('allowPagesDelete', $showDelete);
        // assign template
        $this->tpl->assignArray($this->templates[$this->record['template_id']], 'template');
        // parse datagrids
        $this->tpl->assign('revisions', $this->dgRevisions->getNumResults() != 0 ? $this->dgRevisions->getContent() : false);
        $this->tpl->assign('drafts', $this->dgDrafts->getNumResults() != 0 ? $this->dgDrafts->getContent() : false);
        // parse the tree
        $this->tpl->assign('tree', BackendPagesModel::getTreeHTML());
        // assign if profiles module is installed
        $this->tpl->assign('showAuthenticationTab', BackendModel::isModuleInstalled('Profiles'));
    }