setName('backup:target:backends') ->setDescription('List the storage backends (from files_external) that can be used as backup location'); } protected function execute(InputInterface $input, OutputInterface $output): int { $backends = $this->targets->availableBackends(); if ($input->getOption('output') !== self::OUTPUT_FORMAT_PLAIN) { $this->writeMixedInOutputFormat($input, $output, $backends); return 0; } foreach ($backends as $b) { $output->writeln(sprintf('%s (%s) auth schemes: %s', $b['id'], $b['name'], implode(', ', $b['auth']))); foreach ($b['parameters'] as $key => $p) { $output->writeln(sprintf(' -o %s=... %s', $key, is_array($p) ? ($p['value'] ?? '') : '')); } } return 0; } }