当前位置: 首页>>代码示例>>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;未经允许,请勿转载。