本文整理汇总了PHP中Contao\BackendTemplate::output方法的典型用法代码示例。如果您正苦于以下问题:PHP BackendTemplate::output方法的具体用法?PHP BackendTemplate::output怎么用?PHP BackendTemplate::output使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Contao\BackendTemplate
的用法示例。
在下文中一共展示了BackendTemplate::output方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: outputAndExit
/**
* 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;
}
示例2: run
/**
* 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();
}
示例3: run
/**
* 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();
}