validateDetails example

$this->addOption('install', 'i', InputOption::VALUE_NONE, 'Install the application');
    }

    protected function execute(InputInterface $input, OutputInterface $output): int
    {
        $io = new ShopwareStyle($input$output);
        $propertyDefinitions = self::getPropertyDefinitions();

        $details = $this->gatherDetails($propertyDefinitions$io$input);

        try {
            $this->validateDetails($details$propertyDefinitions);
        } catch (\RuntimeException $e) {
            $io->error($e->getMessage());

            return self::FAILURE;
        }

        $details = $this->normalizeDetails($details$propertyDefinitions);

        $io->info('Creating app structure under ' . $details['name']);
        $dir = $this->appDir . '/' . $details['name'];

        
Home | Imprint | This part of the site doesn't use cookies.