setName('ldap:create-empty-config') ->setDescription('creates an empty LDAP configuration') ->addOption( 'only-print-prefix', 'p', InputOption::VALUE_NONE, 'outputs only the prefix' ) ; } protected function execute(InputInterface $input, OutputInterface $output): int { $configPrefix = $this->helper->getNextServerConfigurationPrefix(); $configHolder = new Configuration($configPrefix); $configHolder->ldapConfigurationActive = false; $configHolder->saveConfiguration(); $prose = ''; if (!$input->getOption('only-print-prefix')) { $prose = 'Created new configuration with configID '; } $output->writeln($prose . "{$configPrefix}"); return self::SUCCESS; } }