/** * Parse * * @return void */ protected function 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('templates', $this->templates); $this->tpl->assign('blocks', $this->blocks); $this->tpl->assign('extrasData', json_encode(BackendPagesModel::getExtrasData())); $this->tpl->assign('extrasById', json_encode(BackendPagesModel::getExtras())); $this->tpl->assign('prefixURL', rtrim(BackendPagesModel::getFullURL($this->record['parent_id']), '/')); // init var $showDelete = true; // has children? if (BackendPagesModel::getFirstChildId($this->record['id']) !== false) { $showDelete = false; } if (!$this->record['delete_allowed']) { $showDelete = false; } // show deletebutton $this->tpl->assign('showDelete', $showDelete); // assign template $this->tpl->assignArray($this->templates[$this->record['template_id']], 'template'); // parse the form $this->frm->parse($this->tpl); // 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()); }
/** * Parse the form */ protected function parse() { parent::parse(); $this->tpl->assign('dataGridUsers', $this->dataGridUsers->getNumResults() != 0 ? $this->dataGridUsers->getContent() : false); $this->tpl->assign('item', $this->record); $this->tpl->assign('groupName', $this->record['name']); }
/** * Parse the form */ protected function parse() { parent::parse(); $this->tpl->assign('dataGridUsers', $this->dataGridUsers->getNumResults() != 0 ? $this->dataGridUsers->getContent() : false); $this->tpl->assign('item', $this->record); $this->tpl->assign('groupName', $this->record['name']); // only allow deletion of empty groups $this->tpl->assign('showGroupsDelete', $this->dataGridUsers->getNumResults() == 0 && BackendAuthentication::isAllowedAction('delete')); }
/** * Parse. */ protected function parse() { parent::parse(); // assign theme data $this->tpl->assign('name', $this->currentTheme); $this->tpl->assign('warnings', $this->warnings); $this->tpl->assign('information', $this->information); $this->tpl->assign('showExtensionsInstallTheme', !BackendExtensionsModel::isThemeInstalled($this->currentTheme) && BackendAuthentication::isAllowedAction('install_theme')); // data grids $this->tpl->assign('dataGridTemplates', isset($this->dataGridTemplates) && $this->dataGridTemplates->getNumResults() > 0 ? $this->dataGridTemplates->getContent() : false); }
/** * Parse the form */ protected function parse() { parent::parse(); // assign the active record and additional variables $this->tpl->assign('profile', $this->profile); // parse data grids $this->tpl->assign('dgGroups', $this->dgGroups->getNumResults() != 0 ? $this->dgGroups->getContent() : false); // show delete or undelete button? if ($this->profile['status'] === 'deleted') { $this->tpl->assign('deleted', true); } // show block or unblock button? if ($this->profile['status'] === 'blocked') { $this->tpl->assign('blocked', true); } }
/** * Parse the form * * @return void */ protected function parse() { // call parent 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); } // assign the active record and additional variables $this->tpl->assign('item', $this->record); $this->tpl->assign('status', BL::lbl(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); // assign category if ($this->categoryId !== null) { $this->tpl->assign('categoryId', $this->categoryId); } }
/** * Parse the page */ protected function parse() { parent::parse(); $this->tpl->assign('datagrid', $this->datagrid->getNumResults() != 0 ? $this->datagrid->getContent() : false); $this->tpl->assign('varcharFound', $this->allowSave); }
/** * @param string $query The query to retrieve the data. * @param array[optional] $parameters The parameters to be used inside the query. * @param string[optional] $resultsQuery The optional count query, used to calculate the number of results. * @param array[optional] $resultsParameters Theh parameters to be used inside the results query. */ public function __construct($query, $parameters = array(), $resultsQuery = null, $resultsParameters = array()) { // results query? $results = $resultsQuery !== null ? array($resultsQuery, $resultsParameters) : null; // create a new source-object $source = new SpoonDataGridSourceDB(BackendModel::getDB(), array($query, (array) $parameters), $results); parent::__construct($source); }