<?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;
/* api/blocks/api_search_render.html.twig */
class __TwigTemplate_8af788a5dc91726078b6f0bce2b7d35bfebe199cd07eb0b2b131d2e24630df8c 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", "api/blocks/api_search_render.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "api/blocks/api_search_render.html.twig"));
// line 1
$context["article"] = $this->env->getFunction('sulu_content_load')->getCallable()((isset($context["id"]) || array_key_exists("id", $context) ? $context["id"] : (function () { throw new RuntimeError('Variable "id" does not exist.', 1, $this->source); })()));
// line 2
if ((((CoreExtension::getAttribute($this->env, $this->source, ($context["article"] ?? null), "author", [], "any", true, true, false, 2) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 2, $this->source); })()), "author", [], "any", false, false, false, 2))) && CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, // line 3
($context["article"] ?? null), "author", [], "any", false, true, false, 3), "contact", [], "any", true, true, false, 3)) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 3, $this->source); })()), "author", [], "any", false, false, false, 3), "contact", [], "any", false, false, false, 3)))) {
// line 4
yield "\t";
$context["author"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $this->extensions['Sulu\Bundle\SecurityBundle\Twig\UserTwigExtension']->resolveUserFunction(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 4, $this->source); })()), "author", [], "any", false, false, false, 4)), "contact", [], "any", false, false, false, 4), "fullName", [], "any", false, false, false, 4);
}
// line 6
if ((CoreExtension::getAttribute($this->env, $this->source, ($context["article"] ?? null), "content", [], "any", true, true, false, 6) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 6, $this->source); })()), "content", [], "any", false, false, false, 6)))) {
// line 7
yield "\t";
$context["articleContent"] = CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 7, $this->source); })()), "content", [], "any", false, false, false, 7);
}
// line 9
if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["article"] ?? null), "extension", [], "any", false, true, false, 9), "excerpt", [], "any", false, true, false, 9), "categories", [], "any", true, true, false, 9) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 9, $this->source); })()), "extension", [], "any", false, false, false, 9), "excerpt", [], "any", false, false, false, 9), "categories", [], "any", false, false, false, 9)))) {
// line 10
yield "\t";
$context["categories"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 10, $this->source); })()), "extension", [], "any", false, false, false, 10), "excerpt", [], "any", false, false, false, 10), "categories", [], "any", false, false, false, 10);
}
// line 12
if ((CoreExtension::getAttribute($this->env, $this->source, ($context["articleContent"] ?? null), "chapo", [], "any", true, true, false, 12) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, (isset($context["articleContent"]) || array_key_exists("articleContent", $context) ? $context["articleContent"] : (function () { throw new RuntimeError('Variable "articleContent" does not exist.', 12, $this->source); })()), "chapo", [], "any", false, false, false, 12)))) {
// line 13
yield "\t";
$context["chapo"] = CoreExtension::getAttribute($this->env, $this->source, (isset($context["articleContent"]) || array_key_exists("articleContent", $context) ? $context["articleContent"] : (function () { throw new RuntimeError('Variable "articleContent" does not exist.', 13, $this->source); })()), "chapo", [], "any", false, false, false, 13);
}
// line 15
if ((CoreExtension::getAttribute($this->env, $this->source, ($context["articleContent"] ?? null), "routePath", [], "any", true, true, false, 15) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, (isset($context["articleContent"]) || array_key_exists("articleContent", $context) ? $context["articleContent"] : (function () { throw new RuntimeError('Variable "articleContent" does not exist.', 15, $this->source); })()), "routePath", [], "any", false, false, false, 15)))) {
// line 16
yield "\t";
$context["routePath"] = CoreExtension::getAttribute($this->env, $this->source, (isset($context["articleContent"]) || array_key_exists("articleContent", $context) ? $context["articleContent"] : (function () { throw new RuntimeError('Variable "articleContent" does not exist.', 16, $this->source); })()), "routePath", [], "any", false, false, false, 16);
}
// line 18
if ((CoreExtension::getAttribute($this->env, $this->source, ($context["articleContent"] ?? null), "title", [], "any", true, true, false, 18) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, (isset($context["articleContent"]) || array_key_exists("articleContent", $context) ? $context["articleContent"] : (function () { throw new RuntimeError('Variable "articleContent" does not exist.', 18, $this->source); })()), "title", [], "any", false, false, false, 18)))) {
// line 19
yield "\t";
$context["title"] = CoreExtension::getAttribute($this->env, $this->source, (isset($context["articleContent"]) || array_key_exists("articleContent", $context) ? $context["articleContent"] : (function () { throw new RuntimeError('Variable "articleContent" does not exist.', 19, $this->source); })()), "title", [], "any", false, false, false, 19);
}
// line 21
if ((CoreExtension::getAttribute($this->env, $this->source, ($context["articleContent"] ?? null), "front_title", [], "any", true, true, false, 21) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, (isset($context["articleContent"]) || array_key_exists("articleContent", $context) ? $context["articleContent"] : (function () { throw new RuntimeError('Variable "articleContent" does not exist.', 21, $this->source); })()), "front_title", [], "any", false, false, false, 21)))) {
// line 22
yield "\t";
$context["title"] = CoreExtension::getAttribute($this->env, $this->source, (isset($context["articleContent"]) || array_key_exists("articleContent", $context) ? $context["articleContent"] : (function () { throw new RuntimeError('Variable "articleContent" does not exist.', 22, $this->source); })()), "front_title", [], "any", false, false, false, 22);
}
// line 24
yield "
";
// line 25
if (((((array_key_exists("gt_first", $context) && !Twig\Extension\CoreExtension::testEmpty((isset($context["gt_first"]) || array_key_exists("gt_first", $context) ? $context["gt_first"] : (function () { throw new RuntimeError('Variable "gt_first" does not exist.', 25, $this->source); })()))) && CoreExtension::getAttribute($this->env, $this->source, ($context["article"] ?? null), "template", [], "any", true, true, false, 25)) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 25, $this->source); })()), "template", [], "any", false, false, false, 25))) && (0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 25, $this->source); })()), "template", [], "any", false, false, false, 25), "groupe-travail")))) {
// line 26
yield "\t";
$context["introGtEnable"] = "team-project-section";
} else {
// line 28
yield "\t";
$context["introGtEnable"] = "";
}
// line 30
if ((CoreExtension::getAttribute($this->env, $this->source, ($context["article"] ?? null), "template", [], "any", true, true, false, 30) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 30, $this->source); })()), "template", [], "any", false, false, false, 30)))) {
// line 31
yield "\t<div class=\"preview-container ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 31, $this->source); })()), "template", [], "any", false, false, false, 31), "html", null, true);
yield " br8 dflex fdc ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["introGtEnable"]) || array_key_exists("introGtEnable", $context) ? $context["introGtEnable"] : (function () { throw new RuntimeError('Variable "introGtEnable" does not exist.', 31, $this->source); })()), "html", null, true);
yield "\"
";
// line 32
if ((CoreExtension::getAttribute($this->env, $this->source, ($context["article"] ?? null), "content", [], "any", true, true, false, 32) && CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["article"] ?? null), "content", [], "any", false, true, false, 32), "title", [], "any", true, true, false, 32))) {
// line 33
yield " data-title=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 33, $this->source); })()), "content", [], "any", false, false, false, 33), "title", [], "any", false, false, false, 33), "html", null, true);
yield "\"
";
}
// line 35
yield " >
\t\t";
// line 36
if ((((0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 36, $this->source); })()), "template", [], "any", false, false, false, 36), "articles")) || (0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 36, $this->source); })()), "template", [], "any", false, false, false, 36), "analyses"))) || (0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 36, $this->source); })()), "template", [], "any", false, false, false, 36), "guides_outils")))) {
// line 37
yield "\t\t\t";
yield from $this->loadTemplate("api/blocks/articles-preview-content.html.twig", "api/blocks/api_search_render.html.twig", 37)->unwrap()->yield($context);
// line 38
yield "\t\t";
} elseif ((0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 38, $this->source); })()), "template", [], "any", false, false, false, 38), "agenda"))) {
// line 39
yield "\t\t\t";
yield from $this->loadTemplate("api/blocks/agenda-preview-content.html.twig", "api/blocks/api_search_render.html.twig", 39)->unwrap()->yield($context);
// line 40
yield "\t\t";
} elseif ((0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 40, $this->source); })()), "template", [], "any", false, false, false, 40), "newsletters"))) {
// line 41
yield "\t\t\t";
yield from $this->loadTemplate("api/blocks/newsletters-preview-content.html.twig", "api/blocks/api_search_render.html.twig", 41)->unwrap()->yield($context);
// line 42
yield "\t\t";
} elseif ((0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 42, $this->source); })()), "template", [], "any", false, false, false, 42), "offres"))) {
// line 43
yield "\t\t\t";
yield from $this->loadTemplate("api/blocks/offres-preview-content.html.twig", "api/blocks/api_search_render.html.twig", 43)->unwrap()->yield($context);
// line 44
yield "\t\t";
} elseif ((0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 44, $this->source); })()), "template", [], "any", false, false, false, 44), "aapami"))) {
// line 45
yield "\t\t\t";
yield from $this->loadTemplate("api/blocks/aapami-preview-content.html.twig", "api/blocks/api_search_render.html.twig", 45)->unwrap()->yield($context);
// line 46
yield "\t\t";
} elseif ((0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 46, $this->source); })()), "template", [], "any", false, false, false, 46), "fiches_territoires"))) {
// line 47
yield "\t\t\t";
yield from $this->loadTemplate("api/blocks/territoire-preview-content.html.twig", "api/blocks/api_search_render.html.twig", 47)->unwrap()->yield($context);
// line 48
yield "\t\t";
} elseif ((0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 48, $this->source); })()), "template", [], "any", false, false, false, 48), "experiences"))) {
// line 49
yield "\t\t\t";
yield from $this->loadTemplate("api/blocks/experience-map-preview.html.twig", "api/blocks/api_search_render.html.twig", 49)->unwrap()->yield($context);
// line 50
yield "\t\t";
} elseif ((0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 50, $this->source); })()), "template", [], "any", false, false, false, 50), "groupe-travail"))) {
// line 51
yield "\t\t\t";
yield from $this->loadTemplate("api/blocks/groupe-travail-preview-content.html.twig", "api/blocks/api_search_render.html.twig", 51)->unwrap()->yield($context);
// line 52
yield "\t\t";
}
// line 53
yield "\t</div>
";
}
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "api/blocks/api_search_render.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 172 => 53, 169 => 52, 166 => 51, 163 => 50, 160 => 49, 157 => 48, 154 => 47, 151 => 46, 148 => 45, 145 => 44, 142 => 43, 139 => 42, 136 => 41, 133 => 40, 130 => 39, 127 => 38, 124 => 37, 122 => 36, 119 => 35, 113 => 33, 111 => 32, 104 => 31, 102 => 30, 98 => 28, 94 => 26, 92 => 25, 89 => 24, 85 => 22, 83 => 21, 79 => 19, 77 => 18, 73 => 16, 71 => 15, 67 => 13, 65 => 12, 61 => 10, 59 => 9, 55 => 7, 53 => 6, 49 => 4, 47 => 3, 46 => 2, 44 => 1,);
}
public function getSourceContext()
{
return new Source("{% set article = sulu_content_load(id) %}
{% if article.author is defined and article.author is not empty and
\tarticle.author.contact is defined and article.author.contact is not empty %}
\t{% set author = sulu_resolve_user(article.author).contact.fullName %}
{% endif %}
{% if article.content is defined and article.content is not empty %}
\t{% set articleContent = article.content %}
{% endif %}
{% if article.extension.excerpt.categories is defined and article.extension.excerpt.categories is not empty %}
\t{% set categories = article.extension.excerpt.categories %}
{% endif %}
{% if articleContent.chapo is defined and articleContent.chapo is not empty %}
\t{% set chapo = articleContent.chapo %}
{% endif %}
{% if articleContent.routePath is defined and articleContent.routePath is not empty %}
\t{% set routePath = articleContent.routePath %}
{% endif %}
{% if articleContent.title is defined and articleContent.title is not empty %}
\t{% set title = articleContent.title %}
{% endif %}
{% if articleContent.front_title is defined and articleContent.front_title is not empty %}
\t{% set title = articleContent.front_title %}
{% endif %}
{% if gt_first is defined and gt_first is not empty and article.template is defined and article.template is not empty and article.template == \"groupe-travail\" %}
\t{% set introGtEnable = \"team-project-section\" %}
{% else %}
\t{% set introGtEnable = \"\" %}
{% endif %}
{% if article.template is defined and article.template is not empty %}
\t<div class=\"preview-container {{ article.template }} br8 dflex fdc {{ introGtEnable }}\"
{% if article.content is defined and article.content.title is defined %}
data-title=\"{{article.content.title}}\"
{% endif %}
>
\t\t{% if article.template == \"articles\" or article.template == \"analyses\" or article.template == \"guides_outils\" %}
\t\t\t{% include \"api/blocks/articles-preview-content.html.twig\" %}
\t\t{% elseif article.template == \"agenda\" %}
\t\t\t{% include \"api/blocks/agenda-preview-content.html.twig\" %}
\t\t{% elseif article.template == \"newsletters\" %}
\t\t\t{% include \"api/blocks/newsletters-preview-content.html.twig\" %}
\t\t{% elseif article.template == \"offres\" %}
\t\t\t{% include \"api/blocks/offres-preview-content.html.twig\" %}
\t\t{% elseif article.template == \"aapami\" %}
\t\t\t{% include \"api/blocks/aapami-preview-content.html.twig\" %}
\t\t{% elseif article.template == \"fiches_territoires\" %}
\t\t\t{% include \"api/blocks/territoire-preview-content.html.twig\" %}
\t\t{% elseif article.template == \"experiences\" %}
\t\t\t{% include \"api/blocks/experience-map-preview.html.twig\" %}
\t\t{% elseif article.template == \"groupe-travail\" %}
\t\t\t{% include \"api/blocks/groupe-travail-preview-content.html.twig\" %}
\t\t{% endif %}
\t</div>
{% endif %}
", "api/blocks/api_search_render.html.twig", "/var/www/html/templates/api/blocks/api_search_render.html.twig");
}
}