var/cache/website/dev/twig/d4/d484680431c1fcdb9b6ea0cdcbe004cf69c35434c2464cefe7ff23e1455d144f.php line 34

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. /* blocks/previews/preview-thematique-logic.html.twig */
  15. class __TwigTemplate_6a3f57bd6f95715c196fb0e26ab9f6bfbb2d9cb1663e60afb9e32bcb70a04ed5 extends Template
  16. {
  17.     private $source;
  18.     private $macros = [];
  19.     public function __construct(Environment $env)
  20.     {
  21.         parent::__construct($env);
  22.         $this->source $this->getSourceContext();
  23.         $this->parent false;
  24.         $this->blocks = [
  25.         ];
  26.     }
  27.     protected function doDisplay(array $context, array $blocks = [])
  28.     {
  29.         $macros $this->macros;
  30.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  31.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""blocks/previews/preview-thematique-logic.html.twig"));
  32.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  33.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""blocks/previews/preview-thematique-logic.html.twig"));
  34.         // line 1
  35.         if ((CoreExtension::getAttribute($this->env$this->source, ($context["category"] ?? null), "uuid", [], "any"truetruefalse1) &&  !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env$this->source, (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'1$this->source); })()), "uuid", [], "any"falsefalsefalse1)))) {
  36.             // line 2
  37.             yield "\t";
  38.             $context["page"] = $this->env->getFunction('sulu_content_load')->getCallable()(CoreExtension::getAttribute($this->env$this->source, (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'2$this->source); })()), "uuid", [], "any"falsefalsefalse2));
  39.         }
  40.         // line 4
  41.         yield "<a href=\"";
  42.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Sulu\Bundle\WebsiteBundle\Twig\Content\ContentPathTwigExtension']->getContentPath(CoreExtension::getAttribute($this->env$this->source, (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'4$this->source); })()), "url", [], "any"falsefalsefalse4)), "html"nulltrue);
  43.         yield "\" class=\"preview-title tac cwhite nodeco preview-category jcc aic dflex br8 shadow-small shadow-thematiques prelative\">
  44. \t";
  45.         // line 5
  46.         if ((CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, ($context["page"] ?? null), "content", [], "any"falsetruefalse5), "header_img", [], "any"truetruefalse5) &&  !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'5$this->source); })()), "content", [], "any"falsefalsefalse5), "header_img", [], "any"falsefalsefalse5)))) {
  47.             // line 6
  48.             yield "\t\t<img src=\"";
  49.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($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); })()), "content", [], "any"falsefalsefalse6), "header_img", [], "any"falsefalsefalse6), "formats", [], "any"falsefalsefalse6), "sulu-400x400.webp", [], "array"falsefalsefalse6), "html"nulltrue);
  50.             yield "\" srcset=\"";
  51.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($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); })()), "content", [], "any"falsefalsefalse6), "header_img", [], "any"falsefalsefalse6), "formats", [], "any"falsefalsefalse6), "300x.webp", [], "array"falsefalsefalse6), "html"nulltrue);
  52.             yield " 300w, ";
  53.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($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); })()), "content", [], "any"falsefalsefalse6), "header_img", [], "any"falsefalsefalse6), "formats", [], "any"falsefalsefalse6), "600x.webp", [], "array"falsefalsefalse6), "html"nulltrue);
  54.             yield " 600w, ";
  55.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($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); })()), "content", [], "any"falsefalsefalse6), "header_img", [], "any"falsefalsefalse6), "formats", [], "any"falsefalsefalse6), "1000x.webp", [], "array"falsefalsefalse6), "html"nulltrue);
  56.             yield " 1000w\" alt=\"";
  57.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\AltImageExtension']->getCopyrightOrDescriptionOrTitle(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($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); })()), "content", [], "any"falsefalsefalse6), "header_img", [], "any"falsefalsefalse6)), "html"nulltrue);
  58.             yield "\" width=\"";
  59.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($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); })()), "content", [], "any"falsefalsefalse6), "header_img", [], "any"falsefalsefalse6), "fileVersion", [], "any"falsefalsefalse6), "properties", [], "any"falsefalsefalse6), "width", [], "any"falsefalsefalse6), "html"nulltrue);
  60.             yield "\" height=\"";
  61.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($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); })()), "content", [], "any"falsefalsefalse6), "header_img", [], "any"falsefalsefalse6), "fileVersion", [], "any"falsefalsefalse6), "properties", [], "any"falsefalsefalse6), "height", [], "any"falsefalsefalse6), "html"nulltrue);
  62.             yield "\" loading=\"lazy\">
  63. \t";
  64.         } else {
  65.             // line 8
  66.             yield "\t\t<img src=\"/resources/img/header-img/header-image.webp\" alt=\"\" width=\"896\" height=\"292\" loading=\"lazy\">
  67. \t";
  68.         }
  69.         // line 10
  70.         yield "\t<div class=\"zi1\">";
  71.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'10$this->source); })()), "title", [], "any"falsefalsefalse10), "html"nulltrue);
  72.         yield "</div>
  73. \t<div class=\"background-color-custom\" style=\"background: ";
  74.         // line 11
  75.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'11$this->source); })()), "content", [], "any"falsefalsefalse11), "color", [], "any"falsefalsefalse11), "html"nulltrue);
  76.         yield "\"></div>
  77. </a>";
  78.         
  79.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  80.         
  81.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  82.         return; yield '';
  83.     }
  84.     /**
  85.      * @codeCoverageIgnore
  86.      */
  87.     public function getTemplateName()
  88.     {
  89.         return "blocks/previews/preview-thematique-logic.html.twig";
  90.     }
  91.     /**
  92.      * @codeCoverageIgnore
  93.      */
  94.     public function isTraitable()
  95.     {
  96.         return false;
  97.     }
  98.     /**
  99.      * @codeCoverageIgnore
  100.      */
  101.     public function getDebugInfo()
  102.     {
  103.         return array (  84 => 11,  79 => 10,  75 => 8,  57 => 6,  55 => 5,  50 => 4,  46 => 2,  44 => 1,);
  104.     }
  105.     public function getSourceContext()
  106.     {
  107.         return new Source("{% if category.uuid is defined and category.uuid is not empty %}
  108. \t{% set page = sulu_content_load(category.uuid) %}
  109. {% endif %}
  110. <a href=\"{{ sulu_content_path(category.url) }}\" class=\"preview-title tac cwhite nodeco preview-category jcc aic dflex br8 shadow-small shadow-thematiques prelative\">
  111. \t{% if page.content.header_img is defined and page.content.header_img is not empty %}
  112. \t\t<img src=\"{{ page.content.header_img.formats['sulu-400x400.webp'] }}\" srcset=\"{{page.content.header_img.formats['300x.webp']}} 300w, {{page.content.header_img.formats['600x.webp']}} 600w, {{page.content.header_img.formats['1000x.webp']}} 1000w\" alt=\"{{ page.content.header_img | copyright_or_description_or_title }}\" width=\"{{ page.content.header_img.fileVersion.properties.width }}\" height=\"{{ page.content.header_img.fileVersion.properties.height }}\" loading=\"lazy\">
  113. \t{% else %}
  114. \t\t<img src=\"/resources/img/header-img/header-image.webp\" alt=\"\" width=\"896\" height=\"292\" loading=\"lazy\">
  115. \t{% endif %}
  116. \t<div class=\"zi1\">{{ category.title }}</div>
  117. \t<div class=\"background-color-custom\" style=\"background: {{ page.content.color }}\"></div>
  118. </a>""blocks/previews/preview-thematique-logic.html.twig""/var/www/html/templates/blocks/previews/preview-thematique-logic.html.twig");
  119.     }
  120. }