Controller example

public function payPalStartViewAction(): void
    {
        $this->renderPayPalView('start');
    }

    /** * renderPayPalView is a helper-method to render templates for the PayPal integration in * the First-Run-Wizard. */
    private function renderPayPalView(string $view): void
    {
        $this->get('plugins')->Controller()->ViewRenderer()->setNoRender(false);
        $this->Front()->Plugins()->Json()->setRenderer(false);

        $this->View()->loadTemplate(sprintf('backend/first_run_wizard/template/%s.tpl', $view));
    }

    private function getVersion(): string
    {
        $version = $this->container->getParameter('shopware.release.version');

        if (!\is_string($version)) {
            throw new RuntimeException('Parameter shopware.release.version has to be an string');
        }
Home | Imprint | This part of the site doesn't use cookies.