當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Backend::__construct方法代碼示例

本文整理匯總了PHP中Backend::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Backend::__construct方法的具體用法?PHP Backend::__construct怎麽用?PHP Backend::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Backend的用法示例。


在下文中一共展示了Backend::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * Initialize the controller
  *
  * 1. Import the user
  * 2. Call the parent constructor
  * 3. Authenticate the user
  * 4. Load the language files
  * DO NOT CHANGE THIS ORDER!
  */
 public function __construct()
 {
     // Redirect to the install tool
     if (!Config::getInstance()->isComplete()) {
         $this->redirect('install.php');
     }
     $this->import('BackendUser', 'User');
     parent::__construct();
     $this->User->authenticate();
     // Password change required
     if ($this->User->pwChange) {
         $objSession = $this->Database->prepare("SELECT su FROM tl_session WHERE sessionID=? AND pid=?")->execute(session_id(), $this->User->id);
         if (!$objSession->su) {
             $this->redirect('contao/password.php');
         }
     }
     // Front end redirect
     if (Input::get('do') == 'feRedirect') {
         $this->redirectToFrontendPage(Input::get('page'), Input::get('article'));
     }
     // Safe mode off
     if (Input::get('smo') && $this->User->isAdmin) {
         $this->Config->update("\$GLOBALS['TL_CONFIG']['coreOnlyMode']", false);
         $this->redirect($this->getReferer());
     }
     $this->loadLanguageFile('default');
     $this->loadLanguageFile('modules');
 }
開發者ID:rburch,項目名稱:core,代碼行數:37,代碼來源:main.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     $this->loadLanguageFile("tl_settings");
     $this->import('BackendUser', 'User');
     $this->import('Environment');
 }
開發者ID:rsclg,項目名稱:RscMemberSubmissionPostProcessor,代碼行數:7,代碼來源:RscMemberSubmissionPostProcessor.php

示例3: __construct

 public function __construct()
 {
     $this->import('BackendUser', 'User');
     parent::__construct();
     $this->import('AvisotaBase', 'Base');
     $this->import('AvisotaNewsletterContent', 'Content');
     $this->import('AvisotaStatic', 'Static');
     $this->import('Database');
     // force all URLs absolute
     $GLOBALS['TL_CONFIG']['forceAbsoluteDomainLink'] = true;
     // load default translations
     $this->loadLanguageFile('default');
     // HOTFIX Remove isotope frontend hook
     if (isset($GLOBALS['TL_HOOKS']['parseTemplate']) && is_array($GLOBALS['TL_HOOKS']['parseTemplate'])) {
         foreach ($GLOBALS['TL_HOOKS']['parseTemplate'] as $k => $v) {
             if ($v[0] == 'IsotopeFrontend') {
                 unset($GLOBALS['TL_HOOKS']['parseTemplate'][$k]);
             }
         }
     }
     // HOTFIX Remove catalog frontend hook
     if (isset($GLOBALS['TL_HOOKS']['parseFrontendTemplate']) && is_array($GLOBALS['TL_HOOKS']['parseFrontendTemplate'])) {
         foreach ($GLOBALS['TL_HOOKS']['parseFrontendTemplate'] as $k => $v) {
             if ($v[0] == 'CatalogExt') {
                 unset($GLOBALS['TL_HOOKS']['parseFrontendTemplate'][$k]);
             }
         }
     }
 }
開發者ID:Ainschy,項目名稱:contao-core,代碼行數:29,代碼來源:AvisotaNewsletterTransport.php

示例4: __construct

 /**
  * Import the back end user object
  */
 public function __construct()
 {
     parent::__construct();
     $this->import('BackendUser', 'User');
     $this->loadLanguageFile('orm_avisota_recipient');
     $this->loadDataContainer('orm_avisota_recipient');
 }
開發者ID:avisota,項目名稱:contao-core,代碼行數:10,代碼來源:tl_avisota_recipient_export.php

示例5: __construct

	/**
	 * Import String library
	 */
	public function __construct()
	{
		parent::__construct();

		$this->import('String');
		$this->import('Files');
	}
開發者ID:narrenfrei,項目名稱:core,代碼行數:10,代碼來源:StyleSheets.php

示例6: __construct

 public function __construct()
 {
     parent::__construct();
     $category_config = array('table' => $this->table_categories, 'field_id' => 'category_id', 'field_title' => 'category_name', 'field_slug' => 'category_slug');
     $this->load->library('slug');
     $this->slug->set_config($category_config);
 }
開發者ID:NaszvadiG,項目名稱:DhoBlog,代碼行數:7,代碼來源:Categories.php

示例7: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     // Import
     $this->import("BackendUser");
     $this->import("String");
     // Parent
     parent::__construct();
     // Language
     $this->loadLanguageFile("default");
     $this->loadLanguageFile('tl_synccto_clients');
     // Instance a list for regex from the blacklist for folders.
     $this->arrPreparedBlacklistFolder = array();
     foreach ($this->getBlacklistFolder() as $key => $value) {
         $this->arrPreparedBlacklistFolder[$key] = str_replace($this->arrSearch, $this->arrReplace, $value);
     }
     // Instance a list for regex from the blacklist for files.
     $this->arrPreparedBlacklistFiles = array();
     foreach ($this->getBlacklistFile() as $key => $value) {
         $this->arrPreparedBlacklistFiles[$key] = str_replace($this->arrSearch, $this->arrReplace, $value);
     }
     // Instance a list for regex from the hidden table list.
     $this->arrPreparedHiddenTablePlaceholder = array();
     foreach ($this->getHiddenTablePlaceholder() as $key => $value) {
         $this->arrPreparedHiddenTablePlaceholder[$key] = str_replace($this->arrSearch, $this->arrReplace, $value);
     }
     // Replace some elements in TL_ROOT for regex.
     $this->strPreparedTlRoot = str_replace('\\', '\\\\', TL_ROOT);
 }
開發者ID:baumannsven,項目名稱:syncCto,代碼行數:31,代碼來源:SyncCtoHelper.php

示例8: __construct

 public function __construct()
 {
     parent::__construct();
     $page_config = array('table' => $this->table_pages, 'field_id' => 'page_id', 'field_title' => 'page_title', 'field_slug' => 'page_slug');
     $this->load->library('slug');
     $this->slug->set_config($page_config);
 }
開發者ID:otengkwame,項目名稱:DhoBlog,代碼行數:7,代碼來源:Pages.php

示例9: __construct

 public function __construct($objModel)
 {
     if ($objModel instanceof \Model) {
         $this->objModel = $objModel;
     } elseif ($objModel instanceof \Model\Collection) {
         $this->objModel = $objModel->current();
     }
     parent::__construct();
     if ($objModel->purgeBeforeImport && !$this->dryRun) {
         $this->purgeBeforeImport($objModel);
     }
     $this->arrData = $objModel->row();
     $this->objParentModel = EntityImportModel::findByPk($this->objModel->pid);
     $this->Database = Database::getInstance($this->objParentModel->row());
     $this->arrDbSourceFields = $this->Database->listFields($this->dbSourceTable);
     $this->arrDbTargetFields = \Database::getInstance()->listFields($this->dbTargetTable);
     $this->arrDbFileFields = \Database::getInstance()->listFields('tl_files');
     $this->arrMapping = $this->getFieldsMapping(deserialize($this->dbFieldMapping, true), $this->arrDbSourceFields, $this->arrDbTargetFields);
     $this->arrFileMapping = $this->getFieldsMapping(deserialize($this->dbFieldFileMapping, true), $this->arrDbSourceFields, $this->arrDbFileFields);
     $arrNamedMapping = $this->arrMapping;
     // name fields
     array_walk($arrNamedMapping, function (&$value, $index) {
         $value = $value . ' as ' . $index;
     });
     $this->arrNamedMapping = $arrNamedMapping;
 }
開發者ID:heimrichhannot,項目名稱:contao-entity_import,代碼行數:26,代碼來源:Importer.php

示例10: __construct

 public function __construct()
 {
     parent::__construct();
     $this->import('BackendUser', 'User');
     $this->loadLanguageFile('tl_subscribe_plus');
     $this->loadDataContainer('tl_subscribe_plus');
 }
開發者ID:heimrichhannot,項目名稱:contao-newsletter_plus,代碼行數:7,代碼來源:tl_newsletter_channel.php

示例11: __construct

 /**
  * Construct.
  *
  * @SuppressWarnings(PHPMD.Superglobals)
  */
 public function __construct()
 {
     parent::__construct();
     $this->eventDispatcher = $GLOBALS['container']['event-dispatcher'];
     $this->typeManager = $GLOBALS['container']['bootstrap.config-type-manager'];
     $this->loadLanguageFile('bootstrap_config_types');
 }
開發者ID:contao-bootstrap,項目名稱:core,代碼行數:12,代碼來源:BootstrapConfig.php

示例12: __construct

 /**
  * Add the mooRainbow scripts to the page
  */
 public function __construct()
 {
     parent::__construct();
     $this->import('BackendUser', 'User');
     $GLOBALS['TL_CSS'][] = 'plugins/mootools/rainbow.css?' . MOO_RAINBOW . '|screen';
     $GLOBALS['TL_JAVASCRIPT'][] = 'plugins/mootools/rainbow.js?' . MOO_RAINBOW;
 }
開發者ID:jens-wetzel,項目名稱:use2,代碼行數:10,代碼來源:tl_galerie.php

示例13: __construct

 /**
  * Construct.
  */
 public function __construct()
 {
     parent::__construct();
     $this->import('BackendUser', 'User');
     $this->languageEditor = LanguageEditor::getInstance();
     $this->loadTranslationKeys();
 }
開發者ID:netzmacht,項目名稱:contao-language-editor,代碼行數:10,代碼來源:Translation.php

示例14: __construct

 /**
  * Initialize the controller
  *
  * 1. Import the user
  * 2. Call the parent constructor
  * 3. Authenticate the user
  * 4. Load the language files
  * DO NOT CHANGE THIS ORDER!
  */
 public function __construct()
 {
     $this->import('BackendUser', 'User');
     parent::__construct();
     $this->User->authenticate();
     $this->loadLanguageFile('default');
 }
開發者ID:rikaix,項目名稱:core,代碼行數:16,代碼來源:file.php

示例15: __construct

 /**
  * AbstractWebRunner constructor.
  */
 public function __construct()
 {
     // preserve object initialisation order
     \BackendUser::getInstance();
     \Database::getInstance();
     parent::__construct();
 }
開發者ID:avisota,項目名稱:contao-message,代碼行數:10,代碼來源:AbstractWebRunner.php


注:本文中的Backend::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。