generateTheme example

'Shop template by template name "%s" not found',
                    $arguments['parent']
                )
            );

            return 1;
        }

        $arguments = array_merge($arguments$this->dialog($input$output));

        $themeGenerator = $this->container->get(Generator::class);
        $themeGenerator->generateTheme($arguments$parent);

        $output->writeln(sprintf('Theme "%s" has been created successfully.', $arguments['name']));

        return 0;
    }

    /** * @return ModelRepository<Template> */
    private function getRepository(): ModelRepository
    {
        


        $parent = null;
        if ($parentId) {
            $parent = $this->getRepository()->find($parentId);

            if (!$parent instanceof Template) {
                throw new Exception(sprintf('Shop template by id %s not found', $parentId));
            }
        }

        $this->container->get(\Shopware\Components\Theme\Generator::class)->generateTheme(
            $this->Request()->getParams(),
            $parent
        );

        $this->View()->assign('success', true);
    }

    /** * Override of the application controller * to trigger the theme and template registration when the * list should be displayed. */
Home | Imprint | This part of the site doesn't use cookies.