setName('organization-folders:get') ->setDescription('Get organization folder by id') ->addArgument('id', InputArgument::REQUIRED, 'Id of the organization folder to get'); parent::configure(); } protected function execute(InputInterface $input, OutputInterface $output): int { $id = (int)$input->getArgument('id'); try { $organizationFolder = $this->organizationFolderService->find($id); $this->writeTableInOutputFormat($input, $output, [$this->formatTableSerializable($organizationFolder)]); return 0; } catch (Exception $e) { $output->writeln("Exception \"{$e->getMessage()}\" at {$e->getFile()} line {$e->getLine()}"); return 1; } } }