setName('organization-folders:list-organization-providers') ->setDescription('List all registered organization providers'); parent::configure(); } protected function execute(InputInterface $input, OutputInterface $output): int { try { $organizationProviders = $this->organizationProviderManager->getOrganizationProviders(); $result = []; foreach($organizationProviders as $id => $organizationProvider) { $result[] = [ "Id" => $id, "Class" => $organizationProvider::class, ]; } $this->writeTableInOutputFormat($input, $output, $result); return 0; } catch (Exception $e) { $output->writeln("Exception \"{$e->getMessage()}\" at {$e->getFile()} line {$e->getLine()}"); return 1; } } }