/** * Initialize the object * * @param string $strTable * @param integer $intPid */ public function __construct($strTable, $intPid) { $this->import('Database'); parent::__construct(); $this->strTable = $strTable; $this->intPid = $intPid; // Store the path if it is an editable file if ($strTable == 'tl_files') { $objFile = \FilesModel::findByPk($intPid); if ($objFile !== null && in_array($objFile->extension, \StringUtil::trimsplit(',', strtolower(\Config::get('editableFiles'))))) { $this->strPath = $objFile->path; } } }
/** * Initialize the object * * @param array $arrAttributes An optional attributes array */ public function __construct($arrAttributes = null) { parent::__construct(); // Override the output format in the front end if (TL_MODE == 'FE') { /** @var PageModel $objPage */ global $objPage; if ($objPage->outputFormat != '') { $this->strFormat = $objPage->outputFormat; } } $this->addAttributes($arrAttributes); }
/** * Create a new template object * * @param string $strTemplate The template name * @param string $strContentType The content type (defaults to "text/html") */ public function __construct($strTemplate = '', $strContentType = 'text/html') { parent::__construct(); $this->strTemplate = $strTemplate; $this->strContentType = $strContentType; }
/** * Load the database object */ protected function __construct() { parent::__construct(); $this->import('Database'); $this->setStaticUrls(); }
public function __construct() { parent::__construct(); $this->import('Config'); }
/** * Load or create the extract * * @param string $strTable The table name * * @throws \Exception If $strTable is empty */ protected function __construct($strTable) { if ($strTable == '') { throw new \Exception('The table name must not be empty'); } parent::__construct(); $this->strTable = $strTable; $strFile = \System::getContainer()->getParameter('kernel.cache_dir') . '/contao/sql/' . $strTable . '.php'; // Try to load from cache if (file_exists($strFile)) { include $strFile; } else { $this->createExtract(); } }
/** * Load the database object * * Make the constructor public, so pages can be instantiated (see #6182) */ public function __construct() { parent::__construct(); $this->import('Database'); }
/** * Make the constructor public */ public function __construct() { parent::__construct(); }