コード例 #1
0
 /**
  * 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
0
 /**
  * @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
0
ファイル: Autoloader.php プロジェクト: noxludo/TYPO3v4-Core
 /**
  * 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;
 }