Skip to content
Snippets Groups Projects
Select Git revision
  • 8c75f98216614808aed44638437664e816ebc2f0
  • main default protected
  • renovate/lock-file-maintenance
  • demo protected
  • person-select-custom
  • dbp-translation-component
  • icon-set-mapping
  • port-i18next-parser
  • remove-sentry
  • favorites-and-recent-files
  • revert-6c632dc6
  • lit2
  • advertisement
  • wc-part
  • automagic
  • publish
  • wip-cleanup
  • demo-file-handling
18 results

utils.js

  • TestCommand.php 1.00 KiB
    <?php
    
    declare(strict_types=1);
    
    namespace Dbp\Relay\ExampleBundle\Command;
    
    use Symfony\Component\Console\Command\Command;
    use Symfony\Component\Console\Input\InputArgument;
    use Symfony\Component\Console\Input\InputInterface;
    use Symfony\Component\Console\Output\OutputInterface;
    
    /**
     * This is an example command.
     * You can execute it with "php bin/console dbp:my-custom-command my-argument".
     * Change "my-custom-command" to a more meaningful name in $defaultName.
     */
    class TestCommand extends Command
    {
        protected static $defaultName = 'dbp:my-custom-command';
    
        public function __construct()
        {
            parent::__construct();
        }
    
        protected function configure()
        {
            $this->addArgument('argument', InputArgument::REQUIRED, 'Example.');
            $this->setDescription('Hey there!');
        }
    
        protected function execute(InputInterface $input, OutputInterface $output): int
        {
            $argument = $input->getArgument('argument');
            $output->writeln($argument);
    
            return 0;
        }
    }