本文整理匯總了PHP中TYPO3\CMS\Core\Extension\ExtensionManager::loadExtension方法的典型用法代碼示例。如果您正苦於以下問題:PHP ExtensionManager::loadExtension方法的具體用法?PHP ExtensionManager::loadExtension怎麽用?PHP ExtensionManager::loadExtension使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TYPO3\CMS\Core\Extension\ExtensionManager
的用法示例。
在下文中一共展示了ExtensionManager::loadExtension方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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\Extension\ExtensionManager::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\Extension\ExtensionManager::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;
}
}
示例2: 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)
{
$result = FALSE;
if ($this->versionNumber >= 4004000 && !\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('t3skin')) {
// check wether the table can be truncated or if sysext with tca has to be installed
if ($this->checkForUpdate($customMessages)) {
try {
\TYPO3\CMS\Core\Extension\ExtensionManager::loadExtension('t3skin');
$customMessages = 'The system extension "t3skin" was successfully loaded.';
$result = TRUE;
} catch (\RuntimeException $e) {
$result = FALSE;
}
}
}
return $result;
}
示例3: loadExtension
/**
* Wrapper function for loading extensions
*
* @param string $extensionKey
* @return void
*/
protected function loadExtension($extensionKey)
{
\TYPO3\CMS\Core\Extension\ExtensionManager::loadExtension($extensionKey);
}
示例4: activateSaltedPasswords
/**
* Activates saltedpasswords.
*
* @return void
*/
protected function activateSaltedPasswords()
{
if (!\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('rsaauth')) {
\TYPO3\CMS\Core\Extension\ExtensionManager::loadExtension('rsaauth');
}
if (!\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('saltedpasswords')) {
\TYPO3\CMS\Core\Extension\ExtensionManager::loadExtension('saltedpasswords');
}
\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\Configuration\ConfigurationManager::setLocalConfigurationValueByPath('BE/loginSecurityLevel', 'rsa');
\TYPO3\CMS\Core\Configuration\ConfigurationManager::setLocalConfigurationValueByPath('FE/loginSecurityLevel', 'rsa');
}