當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。