当前位置: 首页>>代码示例>>PHP>>正文


PHP Frontend::__construct方法代码示例

本文整理汇总了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;
 }
开发者ID:rikaix,项目名称:core-1,代码行数:12,代码来源:IsotopeGallery.php

示例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';
 }
开发者ID:rburch,项目名称:core,代码行数:39,代码来源:Hybrid.php

示例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;
         }
     }
 }
开发者ID:heimrichhannot,项目名称:contao-share,代码行数:32,代码来源:Share.php

示例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);
 }
开发者ID:bytehead,项目名称:contao-core,代码行数:10,代码来源:FrontendCron.php

示例5: __construct

 public function __construct($submitted)
 {
     parent::__construct();
     $this->submitted = $submitted;
     $this->loadLanguageFile('tl_subscribe_plus');
     $this->loadDataContainer('tl_subscribe_plus');
 }
开发者ID:heimrichhannot,项目名称:contao-newsletter_plus,代码行数:7,代码来源:NlpInputHelper.php

示例6: __construct

 public function __construct($strTemplate = '', $active = null)
 {
     parent::__construct();
     $this->loadLanguageFile('imagemapster');
     $this->strTemplate = $strTemplate;
     $this->active = $active;
 }
开发者ID:heimrichhannot,项目名称:contao-imagemapster,代码行数:7,代码来源:ImageMapster.php

示例7: __construct

 public function __construct()
 {
     parent::__construct();
     $this->load->helper('tools');
     $this->load->library('user_agent');
     $this->load->model('comments_model');
 }
开发者ID:otengkwame,项目名称:DhoBlog,代码行数:7,代码来源:Posts.php

示例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();
 }
开发者ID:srhinow,项目名称:branch_management,代码行数:8,代码来源:feBmHooks.php

示例9: __construct

 /**
  * initialize controller
  */
 public function __construct()
 {
     $this->import('BackendUser', 'User');
     parent::__construct();
     $this->loadLanguageFile('default');
     $this->loadLanguageFile('modules');
     $this->setStaticUrls();
 }
开发者ID:netzmacht,项目名称:contao-timelinejs,代码行数:11,代码来源:JSONController.php

示例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;
     }
 }
开发者ID:boldt-media,项目名称:contao-polls,代码行数:12,代码来源:Poll.php

示例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']);
 }
开发者ID:pixelSpreadde,项目名称:pixelSpreadde_core,代码行数:9,代码来源:AjaxRequest.php

示例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();
 }
开发者ID:4t2,项目名称:fe_editor,代码行数:9,代码来源:FrontendEditorHook.php

示例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';
 }
开发者ID:Juuro,项目名称:Dreamapp-Website,代码行数:15,代码来源:ContentElement.php

示例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();
 }
开发者ID:heimrichhannot,项目名称:contao-member_plus,代码行数:10,代码来源:MemberPlus.php

示例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'));
 }
开发者ID:Juuro,项目名称:Dreamapp-Website,代码行数:14,代码来源:index.php


注:本文中的Frontend::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。