/** * Action for listing all possible distributions * * @param bool $showUnsuitableDistributions * @return void */ public function distributionsAction($showUnsuitableDistributions = false) { $this->addComposerModeNotification(); $importExportInstalled = ExtensionManagementUtility::isLoaded('impexp'); if ($importExportInstalled) { try { /** @var $repositoryHelper Helper */ $repositoryHelper = $this->objectManager->get(Helper::class); // Check if a TER update has been done at all, if not, fetch it directly // Repository needs an update, but not because of the extension hash has changed $isExtListUpdateNecessary = $repositoryHelper->isExtListUpdateNecessary(); if ($isExtListUpdateNecessary > 0 && ($isExtListUpdateNecessary & $repositoryHelper::PROBLEM_EXTENSION_HASH_CHANGED) === 0) { $repositoryHelper->updateExtList(); } } catch (ExtensionManagerException $e) { $this->addFlashMessage($e->getMessage(), $e->getCode(), FlashMessage::ERROR); } $officialDistributions = $this->extensionRepository->findAllOfficialDistributions(); $communityDistributions = $this->extensionRepository->findAllCommunityDistributions(); if (!$showUnsuitableDistributions) { $suitableOfficialDistributions = $this->dependencyUtility->getExtensionsSuitableForTypo3Version($officialDistributions); $this->view->assign('officialDistributions', $suitableOfficialDistributions); $suitableCommunityDistributions = $this->dependencyUtility->getExtensionsSuitableForTypo3Version($communityDistributions); $this->view->assign('communityDistributions', $suitableCommunityDistributions); } else { $this->view->assign('officialDistributions', $officialDistributions); $this->view->assign('communityDistributions', $communityDistributions); } } $this->view->assign('enableDistributionsView', $importExportInstalled); $this->view->assign('showUnsuitableDistributions', $showUnsuitableDistributions); }
/** * Action for listing all possible distributions * * @return void */ public function distributionsAction() { $importExportInstalled = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('impexp'); if ($importExportInstalled) { try { /** @var $repositoryHelper \TYPO3\CMS\Extensionmanager\Utility\Repository\Helper */ $repositoryHelper = $this->objectManager->get('TYPO3\\CMS\\Extensionmanager\\Utility\\Repository\\Helper'); // Check if a TER update has been done at all, if not, fetch it directly // Repository needs an update, but not because of the extension hash has changed $isExtListUpdateNecessary = $repositoryHelper->isExtListUpdateNecessary(); if ($isExtListUpdateNecessary > 0 && ($isExtListUpdateNecessary & $repositoryHelper::PROBLEM_EXTENSION_HASH_CHANGED) === 0) { $repositoryHelper->updateExtList(); } } catch (ExtensionManagerException $e) { $this->addFlashMessage(htmlspecialchars($e->getMessage()), $e->getCode(), FlashMessage::ERROR); } $officialDistributions = $this->extensionRepository->findAllOfficialDistributions(); $this->view->assign('officialDistributions', $officialDistributions); $communityDistributions = $this->extensionRepository->findAllCommunityDistributions(); $this->view->assign('communityDistributions', $communityDistributions); } $this->view->assign('enableDistributionsView', $importExportInstalled); }