/** * Output the template file and exit */ protected function outputAndExit() { $this->Template->theme = \Backend::getTheme(); $this->Template->base = \Environment::get('base'); $this->Template->language = $GLOBALS['TL_LANGUAGE']; $this->Template->charset = \Config::get('characterSet'); $this->Template->pageOffset = \Input::cookie('BE_PAGE_OFFSET'); $this->Template->action = ampersand(\Environment::get('request')); $this->Template->noCookies = $GLOBALS['TL_LANG']['MSC']['noCookies']; $this->Template->title = specialchars($GLOBALS['TL_LANG']['tl_install']['installTool'][0]); $this->Template->expandNode = $GLOBALS['TL_LANG']['MSC']['expandNode']; $this->Template->collapseNode = $GLOBALS['TL_LANG']['MSC']['collapseNode']; $this->Template->loadingData = $GLOBALS['TL_LANG']['MSC']['loadingData']; $this->Template->hasComposer = is_dir(TL_ROOT . '/system/modules/!composer'); $this->Template->output(); exit; }
/** * Run controller and parse the login template. * * @return void * * @SuppressWarnings(PHPMD.Superglobals) * @SuppressWarnings(PHPMD.CamelCaseVariableName) */ public function run() { $this->Template = new \BackendTemplate('be_dcastylepicker'); $this->Template->main = ''; $this->generate(); if (!strlen($this->Template->headline)) { $this->Template->headline = $GLOBALS['TL_CONFIG']['websiteTitle']; } $this->Template->theme = $this->getTheme(); $this->Template->base = $this->Environment->base; $this->Template->language = $GLOBALS['TL_LANGUAGE']; $this->Template->title = $GLOBALS['TL_CONFIG']['websiteTitle']; $this->Template->charset = $GLOBALS['TL_CONFIG']['characterSet']; $this->Template->pageOffset = $this->Input->cookie('BE_PAGE_OFFSET'); $this->Template->error = \Input::get('act') == 'error' ? $GLOBALS['TL_LANG']['ERR']['general'] : ''; $this->Template->skipNavigation = $GLOBALS['TL_LANG']['MSC']['skipNavigation']; $this->Template->request = ampersand($this->Environment->request); $this->Template->top = $GLOBALS['TL_LANG']['MSC']['backToTop']; $this->Template->be27 = !$GLOBALS['TL_CONFIG']['oldBeTheme']; $this->Template->expandNode = $GLOBALS['TL_LANG']['MSC']['expandNode']; $this->Template->collapseNode = $GLOBALS['TL_LANG']['MSC']['collapseNode']; $this->Template->strField = $this->Input->get('fld'); $this->Template->output(); }
/** * Run the controller and parse the template */ public function run() { $template = new BackendTemplate('be_main'); $template->main = ''; // Ajax request if ($_POST && Environment::get('isAjaxRequest')) { $this->objAjax = new Ajax(Input::post('action')); $this->objAjax->executePreActions(); } $strTable = Input::get('table'); $strField = Input::get('field'); // Define the current ID define('CURRENT_ID', Input::get('table') ? $this->Session->get('CURRENT_ID') : Input::get('id')); Controller::loadDataContainer($strTable); $strDriver = 'DC_' . $GLOBALS['TL_DCA'][$strTable]['config']['dataContainer']; $objDca = new $strDriver($strTable); $objDca->field = $strField; // Set the active record if ($this->Database->tableExists($strTable)) { /** @var Model $strModel $strModel */ $strModel = Model::getClassFromTable($strTable); if (class_exists($strModel)) { $objModel = $strModel::findByPk(Input::get('id')); if ($objModel !== null) { $objDca->activeRecord = $objModel; } } } // AJAX request if ($_POST && Environment::get('isAjaxRequest')) { $this->objAjax->executePostActions($objDca); } $partial = new BackendTemplate('be_rte_table_editor'); $template->isPopup = true; $template->main = $partial->parse(); $template->theme = Backend::getTheme(); $template->base = Environment::get('base'); $template->language = $GLOBALS['TL_LANGUAGE']; $template->title = specialchars($GLOBALS['TL_LANG']['MSC']['pagepicker']); $template->charset = Config::get('characterSet'); Config::set('debugMode', false); $template->output(); }