{% extends 'application/layout.html.twig' %}
{% block meta %}
{% include 'application/components/_meta.html.twig' with
{
'title': (page.meta.title) ? page.meta.title : page.title,
'description': (page.meta.description) ? page.meta.description : page.content,
'keywords': (page.meta.keywords) ? page.meta.keywords : null
}
%}
{% endblock %}
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "meta"));
// line 4
echo " ";
$this->loadTemplate("application/components/_meta.html.twig", "application/default/policy.html.twig", 4)->display(twig_array_merge($context, ["title" => ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 6
(isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 6, $this->source); })()), "meta", [], "any", false, false, false, 6), "title", [], "any", false, false, false, 6)) ? (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 6, $this->source); })()), "meta", [], "any", false, false, false, 6), "title", [], "any", false, false, false, 6)) : (twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 6, $this->source); })()), "title", [], "any", false, false, false, 6))), "description" => ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 7
(isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 7, $this->source); })()), "meta", [], "any", false, false, false, 7), "description", [], "any", false, false, false, 7)) ? (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 7, $this->source); })()), "meta", [], "any", false, false, false, 7), "description", [], "any", false, false, false, 7)) : (twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 7, $this->source); })()), "content", [], "any", false, false, false, 7))), "keywords" => ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 8
(isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 8, $this->source); })()), "meta", [], "any", false, false, false, 8), "keywords", [], "any", false, false, false, 8)) ? (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 8, $this->source); })()), "meta", [], "any", false, false, false, 8), "keywords", [], "any", false, false, false, 8)) : (null))]));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$macros = $this->macros;
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "application/default/policy.html.twig"));
$this->parent = $this->loadTemplate("application/layout.html.twig", "application/default/policy.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
protected function render(string $view, array $parameters = [], Response $response = null): Response
{
if ($this->container->has('templating') && $this->container->get('templating')->supports($view)) {
@trigger_error('Using the "templating" service is deprecated since version 4.3 and will be removed in 5.0; use Twig instead.', \E_USER_DEPRECATED);
$content = $this->container->get('templating')->render($view, $parameters);
} elseif ($this->container->has('twig')) {
$content = $this->container->get('twig')->render($view, $parameters);
} else {
throw new \LogicException('You can not use the "render" method if the Templating Component or the Twig Bundle are not available. Try running "composer require symfony/twig-bundle".');
}
* @Route("/cookie-policy", name="app_cookie_policy")
*/
public function cookie(PageRepository $pageRepository)
{
return $this->render('application/default/policy.html.twig', [
'page' => $pageRepository->findOneByRouteName('app_cookie_policy'),
]);
}
/**
* @Route("/privacy", name="app_privacy_policy")
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new ViewEvent($this, $request, $type, $response);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
No log messages
RuntimeError |
---|
Twig\Error\RuntimeError: Impossible to access an attribute ("meta") on a null variable. at templates/application/default/policy.html.twig:6 at twig_get_attribute(object(Environment), object(Source), null, 'meta', array(), 'any', false, false, false, 6) (var/cache/app/twig/3c/3c4a034a619e51c41a3ec08da76737f6437254140bcf4ec4276ac24f16c035df.php:62) at __TwigTemplate_d09a3b5e078fa0bcf06e8581773b98206ab66ed5e8bf35a5370799b078c714a4->block_meta(array('page' => null, 'app' => object(AppVariable), 'extension' => object(Extension), 'owner' => object(Owner), 'blockService' => object(Block)), array('meta' => array(object(__TwigTemplate_d09a3b5e078fa0bcf06e8581773b98206ab66ed5e8bf35a5370799b078c714a4), 'block_meta'), 'stylesheets' => array(object(__TwigTemplate_0316445f804b2ebab6067409f4bfd41643f19fe2c9e136a284c8fca7d67d1ce3), 'block_stylesheets'), 'body' => array(object(__TwigTemplate_d09a3b5e078fa0bcf06e8581773b98206ab66ed5e8bf35a5370799b078c714a4), 'block_body'), 'javascript_vendor' => array(object(__TwigTemplate_0316445f804b2ebab6067409f4bfd41643f19fe2c9e136a284c8fca7d67d1ce3), 'block_javascript_vendor'), 'javascript_component' => array(object(__TwigTemplate_0316445f804b2ebab6067409f4bfd41643f19fe2c9e136a284c8fca7d67d1ce3), 'block_javascript_component'), 'javascript_init' => array(object(__TwigTemplate_0316445f804b2ebab6067409f4bfd41643f19fe2c9e136a284c8fca7d67d1ce3), 'block_javascript_init'))) (vendor/twig/twig/src/Template.php:182) at Twig\Template->displayBlock('meta', array('page' => null, 'app' => object(AppVariable), 'extension' => object(Extension), 'owner' => object(Owner), 'blockService' => object(Block)), array('meta' => array(object(__TwigTemplate_d09a3b5e078fa0bcf06e8581773b98206ab66ed5e8bf35a5370799b078c714a4), 'block_meta'), 'stylesheets' => array(object(__TwigTemplate_0316445f804b2ebab6067409f4bfd41643f19fe2c9e136a284c8fca7d67d1ce3), 'block_stylesheets'), 'body' => array(object(__TwigTemplate_d09a3b5e078fa0bcf06e8581773b98206ab66ed5e8bf35a5370799b078c714a4), 'block_body'), 'javascript_vendor' => array(object(__TwigTemplate_0316445f804b2ebab6067409f4bfd41643f19fe2c9e136a284c8fca7d67d1ce3), 'block_javascript_vendor'), 'javascript_component' => array(object(__TwigTemplate_0316445f804b2ebab6067409f4bfd41643f19fe2c9e136a284c8fca7d67d1ce3), 'block_javascript_component'), 'javascript_init' => array(object(__TwigTemplate_0316445f804b2ebab6067409f4bfd41643f19fe2c9e136a284c8fca7d67d1ce3), 'block_javascript_init'))) (var/cache/app/twig/ae/ae6991510ea4b393fcb66d6877b7ea3d9b68b4c479b80a50f61c4f3de67db2de.php:55) at __TwigTemplate_0316445f804b2ebab6067409f4bfd41643f19fe2c9e136a284c8fca7d67d1ce3->doDisplay(array('page' => null, 'app' => object(AppVariable), 'extension' => object(Extension), 'owner' => object(Owner), 'blockService' => object(Block)), array('meta' => array(object(__TwigTemplate_d09a3b5e078fa0bcf06e8581773b98206ab66ed5e8bf35a5370799b078c714a4), 'block_meta'), 'stylesheets' => array(object(__TwigTemplate_0316445f804b2ebab6067409f4bfd41643f19fe2c9e136a284c8fca7d67d1ce3), 'block_stylesheets'), 'body' => array(object(__TwigTemplate_d09a3b5e078fa0bcf06e8581773b98206ab66ed5e8bf35a5370799b078c714a4), 'block_body'), 'javascript_vendor' => array(object(__TwigTemplate_0316445f804b2ebab6067409f4bfd41643f19fe2c9e136a284c8fca7d67d1ce3), 'block_javascript_vendor'), 'javascript_component' => array(object(__TwigTemplate_0316445f804b2ebab6067409f4bfd41643f19fe2c9e136a284c8fca7d67d1ce3), 'block_javascript_component'), 'javascript_init' => array(object(__TwigTemplate_0316445f804b2ebab6067409f4bfd41643f19fe2c9e136a284c8fca7d67d1ce3), 'block_javascript_init'))) (vendor/twig/twig/src/Template.php:405) at Twig\Template->displayWithErrorHandling(array('page' => null, 'app' => object(AppVariable), 'extension' => object(Extension), 'owner' => object(Owner), 'blockService' => object(Block)), array('meta' => array(object(__TwigTemplate_d09a3b5e078fa0bcf06e8581773b98206ab66ed5e8bf35a5370799b078c714a4), 'block_meta'), 'stylesheets' => array(object(__TwigTemplate_0316445f804b2ebab6067409f4bfd41643f19fe2c9e136a284c8fca7d67d1ce3), 'block_stylesheets'), 'body' => array(object(__TwigTemplate_d09a3b5e078fa0bcf06e8581773b98206ab66ed5e8bf35a5370799b078c714a4), 'block_body'), 'javascript_vendor' => array(object(__TwigTemplate_0316445f804b2ebab6067409f4bfd41643f19fe2c9e136a284c8fca7d67d1ce3), 'block_javascript_vendor'), 'javascript_component' => array(object(__TwigTemplate_0316445f804b2ebab6067409f4bfd41643f19fe2c9e136a284c8fca7d67d1ce3), 'block_javascript_component'), 'javascript_init' => array(object(__TwigTemplate_0316445f804b2ebab6067409f4bfd41643f19fe2c9e136a284c8fca7d67d1ce3), 'block_javascript_init'))) (vendor/twig/twig/src/Template.php:378) at Twig\Template->display(array('page' => null, 'app' => object(AppVariable), 'extension' => object(Extension), 'owner' => object(Owner), 'blockService' => object(Block)), array('meta' => array(object(__TwigTemplate_d09a3b5e078fa0bcf06e8581773b98206ab66ed5e8bf35a5370799b078c714a4), 'block_meta'), 'body' => array(object(__TwigTemplate_d09a3b5e078fa0bcf06e8581773b98206ab66ed5e8bf35a5370799b078c714a4), 'block_body'))) (var/cache/app/twig/3c/3c4a034a619e51c41a3ec08da76737f6437254140bcf4ec4276ac24f16c035df.php:46) at __TwigTemplate_d09a3b5e078fa0bcf06e8581773b98206ab66ed5e8bf35a5370799b078c714a4->doDisplay(array('page' => null, 'app' => object(AppVariable), 'extension' => object(Extension), 'owner' => object(Owner), 'blockService' => object(Block)), array('meta' => array(object(__TwigTemplate_d09a3b5e078fa0bcf06e8581773b98206ab66ed5e8bf35a5370799b078c714a4), 'block_meta'), 'body' => array(object(__TwigTemplate_d09a3b5e078fa0bcf06e8581773b98206ab66ed5e8bf35a5370799b078c714a4), 'block_body'))) (vendor/twig/twig/src/Template.php:405) at Twig\Template->displayWithErrorHandling(array('page' => null, 'app' => object(AppVariable), 'extension' => object(Extension), 'owner' => object(Owner), 'blockService' => object(Block)), array('meta' => array(object(__TwigTemplate_d09a3b5e078fa0bcf06e8581773b98206ab66ed5e8bf35a5370799b078c714a4), 'block_meta'), 'body' => array(object(__TwigTemplate_d09a3b5e078fa0bcf06e8581773b98206ab66ed5e8bf35a5370799b078c714a4), 'block_body'))) (vendor/twig/twig/src/Template.php:378) at Twig\Template->display(array('page' => null)) (vendor/twig/twig/src/Template.php:390) at Twig\Template->render(array('page' => null)) (vendor/symfony/twig-bridge/TwigEngine.php:54) at Symfony\Bridge\Twig\TwigEngine->render('application/default/policy.html.twig', array('page' => null)) (vendor/symfony/framework-bundle/Controller/ControllerTrait.php:233) at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->render('application/default/policy.html.twig', array('page' => null)) (src/Controller/ApplicationController.php:101) at App\Controller\ApplicationController->cookie(object(PageRepository)) (vendor/symfony/http-kernel/HttpKernel.php:158) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:80) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/http-kernel/Kernel.php:201) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (public/index.php:27) |