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


PHP ExtensionManagementUtility::loadExtension方法代码示例

本文整理汇总了PHP中TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadExtension方法的典型用法代码示例。如果您正苦于以下问题:PHP ExtensionManagementUtility::loadExtension方法的具体用法?PHP ExtensionManagementUtility::loadExtension怎么用?PHP ExtensionManagementUtility::loadExtension使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TYPO3\CMS\Core\Utility\ExtensionManagementUtility的用法示例。


在下文中一共展示了ExtensionManagementUtility::loadExtension方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: performUpdate

 /**
  * performs the action of the UpdateManager
  *
  * @param 	array		&$dbQueries: queries done in this update
  * @param 	mixed		&$customMessages: custom messages
  * @return 	bool		whether everything went smoothly or not
  */
 public function performUpdate(array &$dbQueries, &$customMessages)
 {
     if ($this->versionNumber >= 4004000 && !\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('statictemplates')) {
         // check wether the table can be truncated or if sysext with tca has to be installed
         if ($this->checkForUpdate($customMessages[])) {
             try {
                 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadExtension('statictemplates');
                 $customMessages[] = 'System Extension "statictemplates" was successfully loaded, static templates are now supported.';
                 $result = TRUE;
             } catch (\RuntimeException $e) {
                 $result = FALSE;
             }
             return $result;
         }
         return TRUE;
     }
 }
开发者ID:nicksergio,项目名称:TYPO3v4-Core,代码行数:24,代码来源:StaticTemplatesUpdate.php

示例2: loadExtensionThrowsExceptionIfExtensionIsLoaded

 /**
  * @test
  * @expectedException \RuntimeException
  */
 public function loadExtensionThrowsExceptionIfExtensionIsLoaded()
 {
     $extensionKey = $this->getUniqueId('test');
     $packageManager = $this->createMockPackageManagerWithMockPackage($extensionKey);
     ExtensionManagementUtility::setPackageManager($packageManager);
     ExtensionManagementUtility::loadExtension($extensionKey);
 }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:11,代码来源:ExtensionManagementUtilityTest.php

示例3: executeLoadDbalExtension

 /**
  * Adds dbal and adodb to list of loaded extensions
  *
  * @return \TYPO3\CMS\Install\Status\StatusInterface
  */
 protected function executeLoadDbalExtension()
 {
     if (!ExtensionManagementUtility::isLoaded('adodb')) {
         ExtensionManagementUtility::loadExtension('adodb');
     }
     if (!ExtensionManagementUtility::isLoaded('dbal')) {
         ExtensionManagementUtility::loadExtension('dbal');
     }
     /** @var $errorStatus \TYPO3\CMS\Install\Status\WarningStatus */
     $warningStatus = $this->objectManager->get(\TYPO3\CMS\Install\Status\WarningStatus::class);
     $warningStatus->setTitle('Loaded database abstraction layer');
     return $warningStatus;
 }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:18,代码来源:DatabaseConnect.php

示例4: activateSaltedPasswords

 /**
  * Activates saltedpasswords.
  *
  * @return void
  */
 protected function activateSaltedPasswords()
 {
     if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('rsaauth')) {
         \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadExtension('rsaauth');
     }
     if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('saltedpasswords')) {
         \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadExtension('saltedpasswords');
     }
     \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager')->setLocalConfigurationValueByPath('EXT/extConf/saltedpasswords', 'a:2:{s:3:"FE.";a:2:{s:7:"enabled";s:1:"1";s:21:"saltedPWHashingMethod";s:28:"tx_saltedpasswords_salts_md5";}s:3:"BE.";a:2:{s:7:"enabled";s:1:"1";s:21:"saltedPWHashingMethod";s:28:"tx_saltedpasswords_salts_md5";}}');
     \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager')->setLocalConfigurationValueByPath('BE/loginSecurityLevel', 'rsa');
     \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager')->setLocalConfigurationValueByPath('FE/loginSecurityLevel', 'rsa');
 }
开发者ID:nicksergio,项目名称:TYPO3v4-Core,代码行数:17,代码来源:Autoloader.php

示例5: loadExtension

 /**
  * Wrapper function for loading extensions
  *
  * @param string $extensionKey
  * @return void
  */
 protected function loadExtension($extensionKey)
 {
     \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadExtension($extensionKey);
 }
开发者ID:nicksergio,项目名称:TYPO3v4-Core,代码行数:10,代码来源:InstallUtility.php


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