setName('plugin:enable') ->setDescription('This command enables plugin') ->addArgument('plugin-name', InputArgument::REQUIRED, 'Plugin that you want to enable'); } protected function execute(InputInterface $input, OutputInterface $output): int { require SYSTEM . 'init.php'; $io = new SymfonyStyle($input, $output); $pluginName = $input->getArgument('plugin-name'); if (!Plugins::enable($pluginName)) { $io->error('Error while enabling plugin ' . $pluginName . ': ' . Plugins::getError()); return 2; } $io->success('Successfully enabled plugin ' . $pluginName); return Command::SUCCESS; } }