本文整理汇总了PHP中Frontend::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Frontend::__construct方法的具体用法?PHP Frontend::__construct怎么用?PHP Frontend::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Frontend
的用法示例。
在下文中一共展示了Frontend::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Construct the object
* @param string
* @param array
*/
public function __construct($strName, $arrFiles)
{
parent::__construct();
$this->import('Isotope');
$this->name = $strName;
$this->files = $arrFiles;
}
示例2: __construct
/**
* Initialize the object
* @param object
*/
public function __construct($objElement)
{
parent::__construct();
// Store the parent element (see #4556)
if ($objElement instanceof \Model) {
$this->objParent = $objElement;
} elseif ($objElement instanceof \Model\Collection) {
$this->objParent = $objElement->current();
}
if ($this->strKey == '' || $this->strTable == '') {
return;
}
$strModelClass = $this->getModelClassFromTable($this->strTable);
// Load the model
if (class_exists($strModelClass)) {
$objHybrid = $strModelClass::findByPk($objElement->{$this->strKey});
if ($objHybrid === null) {
return;
}
$this->objModel = $objHybrid;
} else {
$objHybrid = $this->Database->prepare("SELECT * FROM " . $this->strTable . " WHERE id=?")->limit(1)->execute($objElement->{$this->strKey});
if ($objHybrid->numRows < 1) {
return;
}
}
$this->arrData = $objHybrid->row();
// Get space and CSS ID from the parent element (!)
$this->space = deserialize($objElement->space);
$this->cssID = deserialize($objElement->cssID, true);
$this->typePrefix = $objElement->typePrefix;
$arrHeadline = deserialize($objElement->headline);
$this->headline = is_array($arrHeadline) ? $arrHeadline['value'] : $arrHeadline;
$this->hl = is_array($arrHeadline) ? $arrHeadline['unit'] : 'h1';
}
示例3: __construct
public function __construct($objModule, $objCurrent)
{
if ($objModule instanceof \Model) {
$this->objModel = $objModule;
} elseif ($objModule instanceof \Model\Collection) {
$this->objModel = $objModule->current();
}
parent::__construct();
$this->objCurrent = $objCurrent;
$this->arrData = $objModule->row();
$this->space = deserialize($objModule->space);
$this->cssID = deserialize($objModule->cssID, true);
if ($this->customTpl != '' && TL_MODE == 'FE') {
$this->strTemplate = $this->customTpl;
}
$arrHeadline = deserialize($objModule->headline);
$this->headline = is_array($arrHeadline) ? $arrHeadline['value'] : $arrHeadline;
$this->hl = is_array($arrHeadline) ? $arrHeadline['unit'] : 'h1';
$this->setDefaultButtons($this->arrData['type']);
$arrButtons = deserialize($this->arrData['share_buttons'], true);
// overwrite buttons
if (!empty($arrButtons)) {
$this->pdfButton = false;
$this->printButton = false;
$this->facebook = false;
$this->twitter = false;
$this->gplus = false;
foreach ($arrButtons as $key => $strType) {
$this->{$strType} = true;
}
}
}
示例4: __construct
/**
* Initialize the object (do not remove)
*/
public function __construct()
{
parent::__construct();
// See #4099
define('BE_USER_LOGGED_IN', false);
define('FE_USER_LOGGED_IN', false);
}
示例5: __construct
public function __construct($submitted)
{
parent::__construct();
$this->submitted = $submitted;
$this->loadLanguageFile('tl_subscribe_plus');
$this->loadDataContainer('tl_subscribe_plus');
}
示例6: __construct
public function __construct($strTemplate = '', $active = null)
{
parent::__construct();
$this->loadLanguageFile('imagemapster');
$this->strTemplate = $strTemplate;
$this->active = $active;
}
示例7: __construct
public function __construct()
{
parent::__construct();
$this->load->helper('tools');
$this->load->library('user_agent');
$this->load->model('comments_model');
}
示例8: __construct
public function __construct()
{
// Set the item from the auto_item parameter
if (!isset($_GET['store']) && $GLOBALS['TL_CONFIG']['useAutoItem'] && isset($_GET['auto_item'])) {
\Input::setGet('store', \Input::get('auto_item'));
}
parent::__construct();
}
示例9: __construct
/**
* initialize controller
*/
public function __construct()
{
$this->import('BackendUser', 'User');
parent::__construct();
$this->loadLanguageFile('default');
$this->loadLanguageFile('modules');
$this->setStaticUrls();
}
示例10: __construct
/**
* Initialize the object
* @param integer
*/
public function __construct($intPoll)
{
parent::__construct();
$objPoll = \Database::getInstance()->prepare($this->getPollQuery('tl_poll'))->limit(1)->execute($intPoll);
if ($objPoll->numRows) {
$this->objPoll = $objPoll;
}
}
示例11: __construct
public function __construct()
{
parent::__construct();
define('BE_USER_LOGGED_IN', $this->getLoginStatus('BE_USER_AUTH'));
define('FE_USER_LOGGED_IN', $this->getLoginStatus('FE_USER_AUTH'));
\Controller::setStaticUrls('TL_FILES_URL', $GLOBALS['TL_CONFIG']['staticFiles']);
\Controller::setStaticUrls('TL_SCRIPT_URL', $GLOBALS['TL_CONFIG']['staticSystem']);
\Controller::setStaticUrls('TL_PLUGINS_URL', $GLOBALS['TL_CONFIG']['staticPlugins']);
}
示例12: __construct
public function __construct()
{
global $objPage;
$this->isActive = true;
#$this->isActive = $this->getLoginStatus('BE_USER_AUTH');
$this->strIgnoreClasses = str_ireplace(array(',', '-'), array('|', '\\-'), $GLOBALS['TL_CONFIG']['frontendEditorIgnoreClasses']);
$this->arrIgnoreContent = explode(',', $GLOBALS['TL_CONFIG']['frontendEditorIgnoreContent'] . ',autoLayoutStart,autoLayoutSeparator,autoLayoutStop');
parent::__construct();
}
示例13: __construct
/**
* Initialize the object
* @param object
* @return string
*/
public function __construct(Database_Result $objElement)
{
parent::__construct();
$this->arrData = $objElement->row();
$this->space = deserialize($objElement->space);
$this->cssID = deserialize($objElement->cssID, true);
$arrHeadline = deserialize($objElement->headline);
$this->headline = is_array($arrHeadline) ? $arrHeadline['value'] : $arrHeadline;
$this->hl = is_array($arrHeadline) ? $arrHeadline['unit'] : 'h1';
}
示例14: __construct
public function __construct($objModel)
{
if ($objModel instanceof \Model) {
$this->objModel = $objModel;
} elseif ($objModel instanceof \Model\Collection) {
$this->objModel = $objModel->current();
}
parent::__construct();
$this->arrData = $objModel->row();
}
示例15: __construct
/**
* Initialize the object
*/
public function __construct()
{
// Try to read from cache
$this->outputFromCache();
// Load user object before calling the parent constructor
$this->import('FrontendUser', 'User');
parent::__construct();
// Check whether a user is logged in
define('BE_USER_LOGGED_IN', $this->getLoginStatus('BE_USER_AUTH'));
define('FE_USER_LOGGED_IN', $this->getLoginStatus('FE_USER_AUTH'));
}