本文整理汇总了PHP中TYPO3\CMS\Core\Extension\ExtensionManager::getLoadedExtensionListArray方法的典型用法代码示例。如果您正苦于以下问题:PHP ExtensionManager::getLoadedExtensionListArray方法的具体用法?PHP ExtensionManager::getLoadedExtensionListArray怎么用?PHP ExtensionManager::getLoadedExtensionListArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Core\Extension\ExtensionManager
的用法示例。
在下文中一共展示了ExtensionManager::getLoadedExtensionListArray方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: toggleExtensionInstallationStateAction
/**
* Toggle extension installation state action
*
* @return void
*/
protected function toggleExtensionInstallationStateAction()
{
$installedExtensions = \TYPO3\CMS\Core\Extension\ExtensionManager::getLoadedExtensionListArray();
$extension = $this->request->getArgument('extension');
if (in_array($extension, $installedExtensions)) {
// uninstall
$this->installUtility->uninstall($extension);
} else {
// install
$this->installUtility->install($extension);
}
$this->redirect('index', 'List');
}
示例2: getRequiredExtensionListArrayReturnsUniqueList
/**
* @test
*/
public function getRequiredExtensionListArrayReturnsUniqueList()
{
$GLOBALS['TYPO3_CONF_VARS']['EXT']['requiredExt'] = 'foo,bar,foo';
$this->assertEquals(array('foo', 'bar'), array_intersect(array('foo', 'bar'), \TYPO3\CMS\Core\Extension\ExtensionManager::getLoadedExtensionListArray()));
}
示例3: createCoreAndExtensionRegistry
/**
* Find all ext_autoload files and merge with core_autoload.
*
* @return array
*/
protected static function createCoreAndExtensionRegistry()
{
$classRegistry = (require PATH_t3lib . 'core_autoload.php');
// At this point during bootstrap the local configuration is initialized,
// extMgm is ready to get the list of enabled extensions
foreach (\TYPO3\CMS\Core\Extension\ExtensionManager::getLoadedExtensionListArray() as $extensionKey) {
try {
$extensionAutoloadFile = \TYPO3\CMS\Core\Extension\ExtensionManager::extPath($extensionKey, 'ext_autoload.php');
if (@file_exists($extensionAutoloadFile)) {
$classRegistry = array_merge($classRegistry, require $extensionAutoloadFile);
}
} catch (\BadFunctionCallException $e) {
}
}
return $classRegistry;
}