settings = $settings; $this->logger = $logger; $this->translator = $translator; $this->extmgr = $extmgr; parent::__construct(); } protected function configure() { $this->setName('ext:reload') ->setDescription('Reload extensions') ->setHelp('Recreates the cached extension list.') ; } protected function execute(InputInterface $input, OutputInterface $output) : int { $settings = $this->settings; $logger = $this->logger; $translator = $this->translator; $extmgr = $this->extmgr; $output->writeln("Using configuration from '".$settings->_configFilePath."'.", OutputInterface::VERBOSITY_VERBOSE); if (!is_writable($settings->_cacheDir)) { $output->writeln(sprintf("The cache directory '%s' is not writable by the system user running this script.", $settings->_cacheDir)); return Command::FAILURE; } if($extmgr->createExtensionConf()) { return Command::SUCCESS; } else { $output->writeln(sprintf("Failed to recreate the extension list.'")); return Command::FAILURE; } } } // vim: ts=4 sw=4 expandtab