2 declare(strict_types = 1);
18 use Symfony\Component\Console\Command\Command;
19 use Symfony\Component\Console\Input\InputArgument;
20 use Symfony\Component\Console\Input\InputInterface;
21 use Symfony\Component\Console\Output\OutputInterface;
22 use Symfony\Component\Console\Style\SymfonyStyle;
40 ->setDescription(
'Activates an extension by key')
41 ->setHelp(
'The extension files must be present in one of the recognized extension folder paths in TYPO3.')
42 ->setAliases([
'extensionmanager:extension:install',
'extension:install'])
45 InputArgument::REQUIRED,
46 'The extension key of a currently deactivated extension, located in one of TYPO3\'s extension paths.'
57 $io =
new SymfonyStyle($input,
$output);
58 $extensionKey = $input->getArgument(
'extensionkey');
63 $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
69 $objectManager->get(InstallUtility::class)->install($extensionKey);
71 $io->success(
'Activated extension ' . $extensionKey .
' successfully.');