/**
* Internal function to execute the command.
*
* @param InputInterface $input The input to inject into the command.
* @param OutputInterface $output The output to inject into the command.
*
* @return integer The command exit code
*
* @since 4.0.0
*/
protected function doExecute(InputInterface $input, OutputInterface $output) : int
{
$this->configureIO($input, $output);
$extensions = $this->getExtensions();
$state = -1;
$discovered_extensions = $this->filterExtensionsBasedOnState($extensions, $state);
if (empty($discovered_extensions)) {
$this->ioStyle->note("There are no pending discovered extensions to install. Perhaps you need to run extension:discover first?");
return Command::SUCCESS;
}
$discovered_extensions = $this->getExtensionsNameAndId($discovered_extensions);
$this->ioStyle->title('Discovered extensions.');
$this->ioStyle->table(['Name', 'Extension ID', 'Version', 'Type', 'Active'], $discovered_extensions);
return Command::SUCCESS;
}