var/cache/website/dev/twig/49/49ea5379b44e6f2aa57e680ff165ac03b2b38bbfc8d6b2345ecc2f3fd736ca2c.php line 55

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. /* articles-blocks/thematiques-from-contact.html.twig */
  15. class __TwigTemplate_fe09b86f19a73d68adb387f97ba942aba65a37d670dcf08c1134d27ac12e2d44 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""articles-blocks/thematiques-from-contact.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""articles-blocks/thematiques-from-contact.html.twig"));
  34.         // line 1
  35.         if ((=== CoreExtension::compare(Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["categories"]) || array_key_exists("categories"$context) ? $context["categories"] : (function () { throw new RuntimeError('Variable "categories" does not exist.'1$this->source); })())), 0))) {
  36.             // line 2
  37.             yield "\t";
  38.             $context['_parent'] = $context;
  39.             $context['_seq'] = CoreExtension::ensureTraversable((isset($context["categories"]) || array_key_exists("categories"$context) ? $context["categories"] : (function () { throw new RuntimeError('Variable "categories" does not exist.'2$this->source); })()));
  40.             foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
  41.                 // line 3
  42.                 yield "\t\t";
  43.                 if ((CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["category"], "pageLink", [], "any"falsetruefalse3), "href", [], "any"truetruefalse3) &&  !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["category"], "pageLink", [], "any"falsefalsefalse3), "href", [], "any"falsefalsefalse3)))) {
  44.                     // line 4
  45.                     yield "\t\t\t<a href=\"";
  46.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$this->env->getFunction('sulu_content_load')->getCallable()(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["category"], "pageLink", [], "any"falsefalsefalse4), "href", [], "any"falsefalsefalse4)), "content", [], "any"falsefalsefalse4), "url", [], "any"falsefalsefalse4), "html"nulltrue);
  47.                     yield "\" class=\"nodeco\">
  48. \t\t";
  49.                 }
  50.                 // line 6
  51.                 yield "\t\t<div class=\"thematiques-tag cwhite fw400 dflex aic\" data-thematiqueid=";
  52.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["category"], "id", [], "any"falsefalsefalse6), "html"nulltrue);
  53.                 yield " style=\"background: ";
  54.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$this->extensions['App\Twig\LoadCategoriesByIdsExtension']->fetchCategory(CoreExtension::getAttribute($this->env$this->source$context["category"], "id", [], "any"falsefalsefalse6), "fr"), "entity", [], "any"falsefalsefalse6), "color", [], "any"falsefalsefalse6), "html"nulltrue);
  55.                 yield "\">
  56. \t\t\t";
  57.                 // line 7
  58.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["category"], "translations", [], "any"falsefalsefalse7), 0, [], "array"falsefalsefalse7), "translation", [], "any"falsefalsefalse7), "html"nulltrue);
  59.                 yield "
  60. \t\t</div>
  61. \t\t";
  62.                 // line 9
  63.                 if ((CoreExtension::getAttribute($this->env$this->source$context["category"], "pageLink", [], "any"truetruefalse9) &&  !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env$this->source$context["category"], "pageLink", [], "any"falsefalsefalse9)))) {
  64.                     yield "</a>";
  65.                 }
  66.                 // line 10
  67.                 yield "\t";
  68.             }
  69.             $_parent $context['_parent'];
  70.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['category'], $context['_parent'], $context['loop']);
  71.             $context array_intersect_key($context$_parent) + $_parent;
  72.         }
  73.         
  74.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  75.         
  76.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  77.         return; yield '';
  78.     }
  79.     /**
  80.      * @codeCoverageIgnore
  81.      */
  82.     public function getTemplateName()
  83.     {
  84.         return "articles-blocks/thematiques-from-contact.html.twig";
  85.     }
  86.     /**
  87.      * @codeCoverageIgnore
  88.      */
  89.     public function isTraitable()
  90.     {
  91.         return false;
  92.     }
  93.     /**
  94.      * @codeCoverageIgnore
  95.      */
  96.     public function getDebugInfo()
  97.     {
  98.         return array (  76 => 10,  72 => 9,  67 => 7,  60 => 6,  54 => 4,  51 => 3,  46 => 2,  44 => 1,);
  99.     }
  100.     public function getSourceContext()
  101.     {
  102.         return new Source("{% if categories|length > 0 %}
  103. \t{% for category in categories %}
  104. \t\t{% if category.pageLink.href is defined and category.pageLink.href is not empty %}
  105. \t\t\t<a href=\"{{sulu_content_load(category.pageLink.href).content.url}}\" class=\"nodeco\">
  106. \t\t{% endif %}
  107. \t\t<div class=\"thematiques-tag cwhite fw400 dflex aic\" data-thematiqueid={{category.id}} style=\"background: {{load_category_by_id(category.id, 'fr').entity.color}}\">
  108. \t\t\t{{category.translations[0].translation}}
  109. \t\t</div>
  110. \t\t{% if category.pageLink is defined and category.pageLink is not empty %}</a>{% endif %}
  111. \t{% endfor %}
  112. {% endif %}
  113. ""articles-blocks/thematiques-from-contact.html.twig""/var/www/html/templates/articles-blocks/thematiques-from-contact.html.twig");
  114.     }
  115. }