<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* articles-blocks/thematiques-from-contact.html.twig */
class __TwigTemplate_fe09b86f19a73d68adb387f97ba942aba65a37d670dcf08c1134d27ac12e2d44 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "articles-blocks/thematiques-from-contact.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "articles-blocks/thematiques-from-contact.html.twig"));
// line 1
if ((1 === 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))) {
// line 2
yield "\t";
$context['_parent'] = $context;
$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); })()));
foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
// line 3
yield "\t\t";
if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["category"], "pageLink", [], "any", false, true, false, 3), "href", [], "any", true, true, false, 3) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["category"], "pageLink", [], "any", false, false, false, 3), "href", [], "any", false, false, false, 3)))) {
// line 4
yield "\t\t\t<a href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $this->env->getFunction('sulu_content_load')->getCallable()(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["category"], "pageLink", [], "any", false, false, false, 4), "href", [], "any", false, false, false, 4)), "content", [], "any", false, false, false, 4), "url", [], "any", false, false, false, 4), "html", null, true);
yield "\" class=\"nodeco\">
\t\t";
}
// line 6
yield "\t\t<div class=\"thematiques-tag cwhite fw400 dflex aic\" data-thematiqueid=";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["category"], "id", [], "any", false, false, false, 6), "html", null, true);
yield " style=\"background: ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $this->extensions['App\Twig\LoadCategoriesByIdsExtension']->fetchCategory(CoreExtension::getAttribute($this->env, $this->source, $context["category"], "id", [], "any", false, false, false, 6), "fr"), "entity", [], "any", false, false, false, 6), "color", [], "any", false, false, false, 6), "html", null, true);
yield "\">
\t\t\t";
// line 7
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["category"], "translations", [], "any", false, false, false, 7), 0, [], "array", false, false, false, 7), "translation", [], "any", false, false, false, 7), "html", null, true);
yield "
\t\t</div>
\t\t";
// line 9
if ((CoreExtension::getAttribute($this->env, $this->source, $context["category"], "pageLink", [], "any", true, true, false, 9) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, $context["category"], "pageLink", [], "any", false, false, false, 9)))) {
yield "</a>";
}
// line 10
yield "\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
}
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "articles-blocks/thematiques-from-contact.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 76 => 10, 72 => 9, 67 => 7, 60 => 6, 54 => 4, 51 => 3, 46 => 2, 44 => 1,);
}
public function getSourceContext()
{
return new Source("{% if categories|length > 0 %}
\t{% for category in categories %}
\t\t{% if category.pageLink.href is defined and category.pageLink.href is not empty %}
\t\t\t<a href=\"{{sulu_content_load(category.pageLink.href).content.url}}\" class=\"nodeco\">
\t\t{% endif %}
\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}}\">
\t\t\t{{category.translations[0].translation}}
\t\t</div>
\t\t{% if category.pageLink is defined and category.pageLink is not empty %}</a>{% endif %}
\t{% endfor %}
{% endif %}
", "articles-blocks/thematiques-from-contact.html.twig", "/var/www/html/templates/articles-blocks/thematiques-from-contact.html.twig");
}
}