findDatabaseTemplate example


        return ['app_template.written' => 'reset'];
    }

    public function reset(): void
    {
        $this->databaseTemplateCache = [];
    }

    public function getSourceContext(string $name): Source
    {
        $template = $this->findDatabaseTemplate($name);

        if (!$template) {
            throw new LoaderError(sprintf('Template "%s" is not defined.', $name));
        }

        return new Source($template['template']$name);
    }

    public function getCacheKey(string $name): string
    {
        return $name;
    }
Home | Imprint | This part of the site doesn't use cookies.