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


PHP BaseScriptClass::init方法代碼示例

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


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

示例1: init

 /**
  * Initializing global variables
  *
  * @return	void		no return values: first initialisation of global variables
  */
 function init()
 {
     $this->MCONF = $GLOBALS['MCONF'];
     parent::init();
     $temp = BackendUtility::getModTSconfig($this->id, 'mod.web_modules.dmail');
     $this->params = $temp['properties'];
     $this->implodedParams = BackendUtility::implodeTSParams($this->params);
     if ($this->params['userTable'] && is_array($GLOBALS["TCA"][$this->params['userTable']])) {
         $this->userTable = $this->params['userTable'];
         $this->allowedTables[] = $this->userTable;
     }
     $this->MOD_MENU['dmail_mode'] = BackendUtility::unsetMenuItems($this->params, $this->MOD_MENU['dmail_mode'], 'menu.dmail_mode');
     // initialize backend user language
     if ($GLOBALS["LANG"]->lang && ExtensionManagementUtility::isLoaded('static_info_tables')) {
         $res = $GLOBALS["TYPO3_DB"]->exec_SELECTquery('sys_language.uid', 'sys_language LEFT JOIN static_languages ON sys_language.static_lang_isocode=static_languages.uid', 'static_languages.lg_typo3=' . $GLOBALS["TYPO3_DB"]->fullQuoteStr($GLOBALS["LANG"]->lang, 'static_languages') . BackendUtility::BEenableFields('sys_language') . BackendUtility::deleteClause('sys_language') . BackendUtility::deleteClause('static_languages'));
         while ($row = $GLOBALS["TYPO3_DB"]->sql_fetch_assoc($res)) {
             $this->sys_language_uid = $row['uid'];
         }
         $GLOBALS["TYPO3_DB"]->sql_free_result($res);
     }
     // load contextual help
     $this->cshTable = '_MOD_' . $this->MCONF['name'];
     if ($GLOBALS["BE_USER"]->uc['edit_showFieldHelp']) {
         $GLOBALS["LANG"]->loadSingleTableDescription($this->cshTable);
     }
 }
開發者ID:preinboth,項目名稱:direct_mail,代碼行數:31,代碼來源:MailerEngine.php

示例2: initialize

 /**
  * Initializes the Module
  *
  * @return 	void
  */
 public function initialize()
 {
     parent::init();
     $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
     $this->doc->setModuleTemplate(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('recycler') . 'mod1/mod_template.html');
     $this->doc->backPath = $GLOBALS['BACK_PATH'];
     $this->doc->setExtDirectStateProvider();
     $this->pageRenderer = $this->doc->getPageRenderer();
     $this->relativePath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('recycler');
     $this->pageRecord = BackendUtility::readPageAccess($this->id, $this->perms_clause);
     $this->isAccessibleForCurrentUser = $this->id && is_array($this->pageRecord) || !$this->id && $this->isCurrentUserAdmin();
     //don't access in workspace
     if ($GLOBALS['BE_USER']->workspace !== 0) {
         $this->isAccessibleForCurrentUser = FALSE;
     }
     //read configuration
     $modTS = $GLOBALS['BE_USER']->getTSConfig('mod.recycler');
     if ($this->isCurrentUserAdmin()) {
         $this->allowDelete = TRUE;
     } else {
         $this->allowDelete = $modTS['properties']['allowDelete'] == '1';
     }
     if (isset($modTS['properties']['recordsPageLimit']) && (int) $modTS['properties']['recordsPageLimit'] > 0) {
         $this->recordsPageLimit = (int) $modTS['properties']['recordsPageLimit'];
     }
 }
開發者ID:khanhdeux,項目名稱:typo3test,代碼行數:31,代碼來源:RecyclerModuleController.php

示例3: init

 /**
  * First initialization of global variables
  *
  * @return	void
  */
 function init()
 {
     $this->MCONF = $GLOBALS['MCONF'];
     parent::init();
     // initialize IconFactory
     $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
     // get TS Params
     $temp = BackendUtility::getModTSconfig($this->id, 'mod.web_modules.dmail');
     if (!is_array($temp['properties'])) {
         $temp['properties'] = array();
     }
     $this->params = $temp['properties'];
     $this->implodedParams = DirectMailUtility::implodeTSParams($this->params);
     $this->MOD_MENU['dmail_mode'] = BackendUtility::unsetMenuItems($this->params, $this->MOD_MENU['dmail_mode'], 'menu.dmail_mode');
     // initialize the page selector
     $this->sys_page = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Page\\PageRepository');
     $this->sys_page->init(true);
     // initialize backend user language
     if ($this->getLanguageService()->lang && ExtensionManagementUtility::isLoaded('static_info_tables')) {
         $res = $GLOBALS["TYPO3_DB"]->exec_SELECTquery('sys_language.uid', 'sys_language LEFT JOIN static_languages ON sys_language.static_lang_isocode=static_languages.uid', 'static_languages.lg_typo3=' . $GLOBALS["TYPO3_DB"]->fullQuoteStr($this->getLanguageService()->lang, 'static_languages') . BackendUtility::BEenableFields('sys_language') . BackendUtility::deleteClause('sys_language') . BackendUtility::deleteClause('static_languages'));
         while ($row = $GLOBALS["TYPO3_DB"]->sql_fetch_assoc($res)) {
             $this->sys_language_uid = $row['uid'];
         }
     }
     // load contextual help
     $this->cshTable = '_MOD_' . $this->MCONF['name'];
     if ($GLOBALS["BE_USER"]->uc['edit_showFieldHelp']) {
         $this->getLanguageService()->loadSingleTableDescription($this->cshTable);
     }
 }
開發者ID:Teddytrombone,項目名稱:direct_mail,代碼行數:35,代碼來源:Statistics.php

示例4: init

 /**
  * Initializes this module.
  *
  * @return void
  */
 public function init()
 {
     $this->MCONF = array('name' => $this->moduleName);
     $this->getLanguageService()->includeLLFile('EXT:dbal/Resources/Private/Language/locallang.xlf');
     parent::init();
     $this->moduleTemplate = GeneralUtility::makeInstance(ModuleTemplate::class);
 }
開發者ID:hlop,項目名稱:TYPO3.CMS,代碼行數:12,代碼來源:ModuleController.php

示例5: init

 /**
  * Initializes the Module
  * @return	void
  */
 function init()
 {
     $id = intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id'));
     $tsconfig = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($id, 'tx_formhandler_mod1');
     $this->settings = $tsconfig['properties']['config.'];
     parent::init();
 }
開發者ID:mhuebe,項目名稱:formhandler,代碼行數:11,代碼來源:index.php

示例6: init

 /**
  * Initializes the Module
  * @return	void
  */
 function init()
 {
     global $BE_USER, $BACK_PATH, $TCA_DESCR, $TCA, $CLIENT, $TYPO3_CONF_VARS;
     parent::init();
     // init registry class
     $this->registry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Registry');
 }
開發者ID:mneuhaus,項目名稱:ke_search,代碼行數:11,代碼來源:index.php

示例7: init

 function init()
 {
     $this->MCONF['name'] = 'xMOD_Module2List';
     $GLOBALS['BE_USER']->modAccess($this->MCONF, 1);
     $GLOBALS['LANG']->includeLLFile("EXT:l10nmgr/Resources/Private/Language/Modules/Module2/locallang.xlf");
     parent::init();
 }
開發者ID:xf-,項目名稱:l10nmgr-1,代碼行數:7,代碼來源:index.php

示例8: __construct

 /**
  * Initializes the Module
  */
 public function __construct()
 {
     $this->moduleTemplate = GeneralUtility::makeInstance(ModuleTemplate::class);
     $this->moduleTemplate->getPageRenderer()->addCssFile(ExtensionManagementUtility::extRelPath('taskcenter') . 'Resources/Public/Css/styles.css');
     $this->getLanguageService()->includeLLFile('EXT:taskcenter/Resources/Private/Language/locallang_task.xlf');
     $this->MCONF = array('name' => $this->moduleName);
     parent::init();
 }
開發者ID:CDRO,項目名稱:TYPO3.CMS,代碼行數:11,代碼來源:TaskModuleController.php

示例9: init

 /**
  * Initializes the module.
  *
  * @return void
  */
 public function init()
 {
     parent::init();
     /*
     if (t3lib_div::_GP('clear_all_cache'))    {
         $this->include_once[] = PATH_t3lib . 'class.t3lib_tcemain.php';
     }
     */
 }
開發者ID:Entwicklungshilfe-NRW,項目名稱:wmdb_base_ewh,代碼行數:14,代碼來源:index.php

示例10: init

 /**
  * Init
  *
  * @return void
  * @todo Define visibility
  */
 public function init()
 {
     parent::init();
     $this->id = (int) GeneralUtility::_GP('id');
     $this->e = GeneralUtility::_GP('e');
     $this->sObj = GeneralUtility::_GP('sObj');
     $this->edit = GeneralUtility::_GP('edit');
     $this->perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
 }
開發者ID:samuweiss,項目名稱:TYPO3-Site,代碼行數:15,代碼來源:TypoScriptTemplateModuleController.php

示例11: __construct

 /**
  * Initializes the Module
  */
 public function __construct()
 {
     $this->moduleTemplate = GeneralUtility::makeInstance(ModuleTemplate::class);
     $cssFile = GeneralUtility::getFileAbsFileName('EXT:taskcenter/Resources/Public/Css/styles.css');
     $this->moduleTemplate->getPageRenderer()->addCssFile(PathUtility::getAbsoluteWebPath($cssFile));
     $this->getLanguageService()->includeLLFile('EXT:taskcenter/Resources/Private/Language/locallang_task.xlf');
     $this->MCONF = array('name' => $this->moduleName);
     parent::init();
 }
開發者ID:TYPO3Incubator,項目名稱:TYPO3.CMS,代碼行數:12,代碼來源:TaskModuleController.php

示例12: __construct

 /**
  * Initializes the Module
  *
  * @return void
  */
 public function __construct()
 {
     parent::init();
     // Initialize document
     $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
     $this->doc->setModuleTemplate(\TYPO3\CMS\Core\Extension\ExtensionManager::extPath('taskcenter') . 'res/mod_template.html');
     $this->doc->backPath = $GLOBALS['BACK_PATH'];
     $this->doc->getPageRenderer()->loadScriptaculous('effects,dragdrop');
     $this->doc->addStyleSheet('tx_taskcenter', '../' . \TYPO3\CMS\Core\Extension\ExtensionManager::siteRelPath('taskcenter') . 'res/mod_styles.css');
 }
開發者ID:noxludo,項目名稱:TYPO3v4-Core,代碼行數:15,代碼來源:TaskModuleController.php

示例13: init

 /**
  * Initializes the Module
  * @return    void
  */
 function init()
 {
     global $BE_USER, $LANG, $BACK_PATH, $TCA_DESCR, $TCA, $CLIENT, $TYPO3_CONF_VARS;
     parent::init();
     /*
     if ( \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('clear_all_cache'))	{
         $this->include_once[] = PATH_t3lib.'class.t3lib_tcemain.php';
     }
     */
 }
開發者ID:bvbmedia,項目名稱:multishop,代碼行數:14,代碼來源:index.php

示例14: init

 /**
  * Init
  *
  * @return void
  * @todo Define visibility
  */
 public function init()
 {
     parent::init();
     $this->id = intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id'));
     $this->e = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('e');
     $this->sObj = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('sObj');
     $this->edit = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('edit');
     $this->perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
     if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('clear_all_cache')) {
         $this->include_once[] = PATH_t3lib . 'class.t3lib_tcemain.php';
     }
 }
開發者ID:nicksergio,項目名稱:TYPO3v4-Core,代碼行數:18,代碼來源:TypoScriptTemplateModuleController.php

示例15: __construct

 /**
  * Initializes the Module
  */
 public function __construct()
 {
     $this->getLanguageService()->includeLLFile('EXT:taskcenter/task/locallang.xlf');
     $this->MCONF = array('name' => $this->moduleName);
     parent::init();
     // Initialize document
     $this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
     $this->doc->setModuleTemplate(ExtensionManagementUtility::extPath('taskcenter') . 'Resources/Private/Templates/mod_template.html');
     $this->doc->backPath = $GLOBALS['BACK_PATH'];
     $this->doc->getPageRenderer()->loadJquery();
     $this->doc->addStyleSheet('tx_taskcenter', '../' . ExtensionManagementUtility::siteRelPath('taskcenter') . 'Resources/Public/Styles/styles.css');
 }
開發者ID:adrolli,項目名稱:TYPO3.CMS,代碼行數:15,代碼來源:TaskModuleController.php


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