setName('app_api:app:list');
$this->setDescription('List ExApps');
}
protected function execute(InputInterface $input, OutputInterface $output): int {
try {
$exApps = $this->mapper->findAll();
$output->writeln('ExApps:');
foreach ($exApps as $exApp) {
$enabled = $exApp->getEnabled() ? 'enabled' : 'disabled';
$output->writeln($exApp->getAppid() . ' (' . $exApp->getName() . '): ' . $exApp->getVersion() . ' [' . $enabled . ']');
}
} catch (Exception) {
$output->writeln('Failed to get list of ExApps');
return 1;
}
return 0;
}
}