<?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;
/* homepage-articles/alaune.html.twig */
class __TwigTemplate_3d93248446f573cb617516f2f3560c0a2f02637e7db725d1bfa5013e40c271c9 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", "homepage-articles/alaune.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "homepage-articles/alaune.html.twig"));
// line 1
yield "<div class=\"dflex fwwrap alaune-preview-container mt-40px mb-40px\">
";
// line 2
$context["request"] = $this->extensions['App\Twig\ArticlesExtension']->getArticlesALaUne((isset($context["thematiques"]) || array_key_exists("thematiques", $context) ? $context["thematiques"] : (function () { throw new RuntimeError('Variable "thematiques" does not exist.', 2, $this->source); })()));
// line 3
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["request"]) || array_key_exists("request", $context) ? $context["request"] : (function () { throw new RuntimeError('Variable "request" does not exist.', 3, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["i"] => $context["hit"]) {
// line 4
yield " ";
$context["type"] = CoreExtension::getAttribute($this->env, $this->source, $context["hit"], "template", [], "any", false, false, false, 4);
// line 5
yield " ";
$context["url"] = $this->extensions['Sulu\Bundle\WebsiteBundle\Twig\Content\ContentPathTwigExtension']->getContentPath(CoreExtension::getAttribute($this->env, $this->source, $context["hit"], "routePath", [], "any", false, false, false, 5));
// line 6
yield " ";
$context["authored"] = CoreExtension::getAttribute($this->env, $this->source, $context["hit"], "authored", [], "any", false, false, false, 6);
// line 7
yield " ";
if ((CoreExtension::getAttribute($this->env, $this->source, $context["hit"], "excerptCategories", [], "any", true, true, false, 7) && (1 === CoreExtension::compare(Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, $context["hit"], "excerptCategories", [], "any", false, false, false, 7)), 0)))) {
// line 8
yield " ";
$context["categories"] = CoreExtension::getAttribute($this->env, $this->source, $context["hit"], "excerptCategories", [], "any", false, false, false, 8);
// line 9
yield " ";
}
// line 10
yield " ";
$context["title"] = CoreExtension::getAttribute($this->env, $this->source, $context["hit"], "title", [], "any", false, false, false, 10);
// line 11
yield "\t\t";
$context["hitChapo"] = CoreExtension::getAttribute($this->env, $this->source, $context["hit"], "chapo", [], "any", false, false, false, 11);
// line 12
yield " ";
$context["hitAuthor"] = CoreExtension::getAttribute($this->env, $this->source, $context["hit"], "author", [], "any", false, false, false, 12);
// line 13
yield "\t\t";
$context["hitReadtime"] = CoreExtension::getAttribute($this->env, $this->source, $context["hit"], "readtime", [], "any", false, false, false, 13);
// line 14
yield " ";
$context["author_name"] = CoreExtension::getAttribute($this->env, $this->source, $context["hit"], "name", [], "any", false, false, false, 14);
// line 15
yield " ";
$context["author_lastname"] = CoreExtension::getAttribute($this->env, $this->source, $context["hit"], "lastname", [], "any", false, false, false, 15);
// line 16
yield " ";
$context["visibleAnnuaire"] = CoreExtension::getAttribute($this->env, $this->source, $context["hit"], "visibleAnnuaire", [], "any", false, false, false, 16);
// line 17
yield " ";
$context["header_img"] = CoreExtension::getAttribute($this->env, $this->source, $context["hit"], "header_img", [], "any", false, false, false, 17);
// line 18
yield "\t\t";
$context["hitContributors"] = CoreExtension::getAttribute($this->env, $this->source, $context["hit"], "contributors", [], "any", false, false, false, 18);
// line 19
yield "\t\t";
$context["hitDepartement"] = CoreExtension::getAttribute($this->env, $this->source, $context["hit"], "departement", [], "any", false, false, false, 19);
// line 20
yield " ";
if ((array_key_exists("header_img", $context) && !Twig\Extension\CoreExtension::testEmpty((isset($context["header_img"]) || array_key_exists("header_img", $context) ? $context["header_img"] : (function () { throw new RuntimeError('Variable "header_img" does not exist.', 20, $this->source); })())))) {
// line 21
yield " ";
$context["img"] = $this->extensions['Sulu\Bundle\MediaBundle\Twig\MediaTwigExtension']->resolveMediaFunction(CoreExtension::getAttribute($this->env, $this->source, (isset($context["header_img"]) || array_key_exists("header_img", $context) ? $context["header_img"] : (function () { throw new RuntimeError('Variable "header_img" does not exist.', 21, $this->source); })()), "id", [], "any", false, false, false, 21), "fr");
// line 22
yield " ";
}
// line 23
yield " ";
if ((array_key_exists("hitContributors", $context) && (1 === CoreExtension::compare(Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["hitContributors"]) || array_key_exists("hitContributors", $context) ? $context["hitContributors"] : (function () { throw new RuntimeError('Variable "hitContributors" does not exist.', 23, $this->source); })())), 0)))) {
// line 24
yield " ";
$context["contributors"] = CoreExtension::getAttribute($this->env, $this->source, $context["hit"], "contributors", [], "any", false, false, false, 24);
// line 25
yield " ";
}
// line 26
yield " ";
if ((array_key_exists("hitReadtime", $context) && !Twig\Extension\CoreExtension::testEmpty((isset($context["hitReadtime"]) || array_key_exists("hitReadtime", $context) ? $context["hitReadtime"] : (function () { throw new RuntimeError('Variable "hitReadtime" does not exist.', 26, $this->source); })())))) {
// line 27
yield " ";
$context["readtime"] = (isset($context["hitReadtime"]) || array_key_exists("hitReadtime", $context) ? $context["hitReadtime"] : (function () { throw new RuntimeError('Variable "hitReadtime" does not exist.', 27, $this->source); })());
// line 28
yield " ";
}
// line 29
yield " ";
if ((array_key_exists("hitChapo", $context) && !Twig\Extension\CoreExtension::testEmpty((isset($context["hitChapo"]) || array_key_exists("hitChapo", $context) ? $context["hitChapo"] : (function () { throw new RuntimeError('Variable "hitChapo" does not exist.', 29, $this->source); })())))) {
// line 30
yield " ";
$context["chapo"] = (isset($context["hitChapo"]) || array_key_exists("hitChapo", $context) ? $context["hitChapo"] : (function () { throw new RuntimeError('Variable "hitChapo" does not exist.', 30, $this->source); })());
// line 31
yield " ";
}
// line 32
yield "\t\t";
if ((array_key_exists("hitDepartement", $context) && !Twig\Extension\CoreExtension::testEmpty((isset($context["hitDepartement"]) || array_key_exists("hitDepartement", $context) ? $context["hitDepartement"] : (function () { throw new RuntimeError('Variable "hitDepartement" does not exist.', 32, $this->source); })())))) {
// line 33
yield "\t\t\t";
$context["departement"] = (isset($context["hitDepartement"]) || array_key_exists("hitDepartement", $context) ? $context["hitDepartement"] : (function () { throw new RuntimeError('Variable "hitDepartement" does not exist.', 33, $this->source); })());
// line 34
yield "\t\t";
}
// line 35
yield " ";
$context["title_lines"] = "";
// line 36
yield " ";
if ((1 === CoreExtension::compare($context["i"], 0))) {
// line 37
yield " ";
$context["title_lines"] = "fourlines";
// line 38
yield " ";
}
// line 39
yield " ";
if ((((0 === CoreExtension::compare((isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 39, $this->source); })()), "articles")) || (0 === CoreExtension::compare((isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 39, $this->source); })()), "analyses"))) || (0 === CoreExtension::compare((isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 39, $this->source); })()), "guides_outils")))) {
// line 40
yield " ";
yield from $this->loadTemplate("blocks/previews-from-controller/preview-article-logic.html.twig", "homepage-articles/alaune.html.twig", 40)->unwrap()->yield($context);
// line 41
yield " ";
} elseif ((0 === CoreExtension::compare((isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 41, $this->source); })()), "experiences"))) {
// line 42
yield " ";
yield from $this->loadTemplate("blocks/previews-from-controller/preview-territoire-experience-logic.html.twig", "homepage-articles/alaune.html.twig", 42)->unwrap()->yield($context);
// line 43
yield " ";
}
// line 44
yield " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['i'], $context['hit'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 45
yield "</div>
";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "homepage-articles/alaune.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 201 => 45, 187 => 44, 184 => 43, 181 => 42, 178 => 41, 175 => 40, 172 => 39, 169 => 38, 166 => 37, 163 => 36, 160 => 35, 157 => 34, 154 => 33, 151 => 32, 148 => 31, 145 => 30, 142 => 29, 139 => 28, 136 => 27, 133 => 26, 130 => 25, 127 => 24, 124 => 23, 121 => 22, 118 => 21, 115 => 20, 112 => 19, 109 => 18, 106 => 17, 103 => 16, 100 => 15, 97 => 14, 94 => 13, 91 => 12, 88 => 11, 85 => 10, 82 => 9, 79 => 8, 76 => 7, 73 => 6, 70 => 5, 67 => 4, 49 => 3, 47 => 2, 44 => 1,);
}
public function getSourceContext()
{
return new Source("<div class=\"dflex fwwrap alaune-preview-container mt-40px mb-40px\">
{% set request = get_articles_a_la_une(thematiques) %}
{% for i, hit in request %}
{% set type = hit.template %}
{% set url = sulu_content_path(hit.routePath) %}
{% set authored = hit.authored %}
{% if hit.excerptCategories is defined and hit.excerptCategories|length > 0 %}
{% set categories = hit.excerptCategories %}
{% endif %}
{% set title = hit.title %}
\t\t{% set hitChapo = hit.chapo %}
{% set hitAuthor = hit.author %}
\t\t{% set hitReadtime = hit.readtime %}
{% set author_name = hit.name %}
{% set author_lastname = hit.lastname %}
{% set visibleAnnuaire = hit.visibleAnnuaire %}
{% set header_img = hit.header_img %}
\t\t{% set hitContributors = hit.contributors %}
\t\t{% set hitDepartement = hit.departement %}
{% if header_img is defined and header_img is not empty %}
{% set img = sulu_resolve_media(header_img.id, 'fr') %}
{% endif %}
{% if hitContributors is defined and hitContributors|length > 0 %}
{% set contributors = hit.contributors %}
{% endif %}
{% if hitReadtime is defined and hitReadtime is not empty %}
{% set readtime = hitReadtime %}
{% endif %}
{% if hitChapo is defined and hitChapo is not empty %}
{% set chapo = hitChapo %}
{% endif %}
\t\t{% if hitDepartement is defined and hitDepartement is not empty %}
\t\t\t{% set departement = hitDepartement %}
\t\t{% endif %}
{% set title_lines = \"\" %}
{% if i > 0 %}
{% set title_lines = \"fourlines\" %}
{% endif %}
{% if type == \"articles\" or type == \"analyses\" or type == \"guides_outils\" %}
{% include \"blocks/previews-from-controller/preview-article-logic.html.twig\" %}
{% elseif type == \"experiences\" %}
{% include \"blocks/previews-from-controller/preview-territoire-experience-logic.html.twig\" %}
{% endif %}
{% endfor %}
</div>
", "homepage-articles/alaune.html.twig", "/var/www/html/templates/homepage-articles/alaune.html.twig");
}
}