var/cache/website/dev/twig/11/11ae2c94090f5f815a49f544e7971b333265a16be84ac92baf996b6f3b6f7bc6.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. /* api/blocks/api_search_render.html.twig */
  15. class __TwigTemplate_1f13e683c064e77b8dba1ed50e62e0dfc25d65ae6fbea1ec5c0ee02a4765a902 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""api/blocks/api_search_render.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""api/blocks/api_search_render.html.twig"));
  34.         // line 1
  35.         $context["article"] = $this->extensions['App\Twig\SafeContentLoadExtension']->safeLoad((isset($context["id"]) || array_key_exists("id"$context) ? $context["id"] : (function () { throw new RuntimeError('Variable "id" does not exist.'1$this->source); })()));
  36.         // line 2
  37.         if ( !(null === (isset($context["article"]) || array_key_exists("article"$context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.'2$this->source); })()))) {
  38.             // line 3
  39.             if ((((CoreExtension::getAttribute($this->env$this->source, ($context["article"] ?? null), "author", [], "any"truetruefalse3) &&  !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.'3$this->source); })()), "author", [], "any"falsefalsefalse3))) && CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source,             // line 4
  40. ($context["article"] ?? null), "author", [], "any"falsetruefalse4), "contact", [], "any"truetruefalse4)) &&  !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::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"falsefalsefalse4), "contact", [], "any"falsefalsefalse4)))) {
  41.                 // line 5
  42.                 yield "\t";
  43.                 $context["author"] = CoreExtension::getAttribute($this->env$this->sourceCoreExtension::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.'5$this->source); })()), "author", [], "any"falsefalsefalse5)), "contact", [], "any"falsefalsefalse5), "fullName", [], "any"falsefalsefalse5);
  44.             }
  45.             // line 7
  46.             if ((CoreExtension::getAttribute($this->env$this->source, ($context["article"] ?? null), "content", [], "any"truetruefalse7) &&  !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.'7$this->source); })()), "content", [], "any"falsefalsefalse7)))) {
  47.                 // line 8
  48.                 yield "\t";
  49.                 $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.'8$this->source); })()), "content", [], "any"falsefalsefalse8);
  50.             }
  51.             // line 10
  52.             if ((CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, ($context["article"] ?? null), "extension", [], "any"falsetruefalse10), "excerpt", [], "any"falsetruefalse10), "categories", [], "any"truetruefalse10) &&  !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::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"falsefalsefalse10), "excerpt", [], "any"falsefalsefalse10), "categories", [], "any"falsefalsefalse10)))) {
  53.                 // line 11
  54.                 yield "\t";
  55.                 $context["categories"] = CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["article"]) || array_key_exists("article"$context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.'11$this->source); })()), "extension", [], "any"falsefalsefalse11), "excerpt", [], "any"falsefalsefalse11), "categories", [], "any"falsefalsefalse11);
  56.             }
  57.             // line 13
  58.             if ((CoreExtension::getAttribute($this->env$this->source, ($context["articleContent"] ?? null), "chapo", [], "any"truetruefalse13) &&  !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.'13$this->source); })()), "chapo", [], "any"falsefalsefalse13)))) {
  59.                 // line 14
  60.                 yield "\t";
  61.                 $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.'14$this->source); })()), "chapo", [], "any"falsefalsefalse14);
  62.             }
  63.             // line 16
  64.             if ((CoreExtension::getAttribute($this->env$this->source, ($context["articleContent"] ?? null), "routePath", [], "any"truetruefalse16) &&  !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.'16$this->source); })()), "routePath", [], "any"falsefalsefalse16)))) {
  65.                 // line 17
  66.                 yield "\t";
  67.                 $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.'17$this->source); })()), "routePath", [], "any"falsefalsefalse17);
  68.             }
  69.             // line 19
  70.             if ((CoreExtension::getAttribute($this->env$this->source, ($context["articleContent"] ?? null), "title", [], "any"truetruefalse19) &&  !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.'19$this->source); })()), "title", [], "any"falsefalsefalse19)))) {
  71.                 // line 20
  72.                 yield "\t";
  73.                 $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.'20$this->source); })()), "title", [], "any"falsefalsefalse20);
  74.             }
  75.             // line 22
  76.             if ((CoreExtension::getAttribute($this->env$this->source, ($context["articleContent"] ?? null), "front_title", [], "any"truetruefalse22) &&  !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.'22$this->source); })()), "front_title", [], "any"falsefalsefalse22)))) {
  77.                 // line 23
  78.                 yield "\t";
  79.                 $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.'23$this->source); })()), "front_title", [], "any"falsefalsefalse23);
  80.             }
  81.             // line 25
  82.             yield "
  83. ";
  84.             // line 26
  85.             if ((CoreExtension::getAttribute($this->env$this->source, ($context["article"] ?? null), "template", [], "any"truetruefalse26) &&  !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.'26$this->source); })()), "template", [], "any"falsefalsefalse26)))) {
  86.                 // line 27
  87.                 yield "\t";
  88.                 // line 42
  89.                 yield "\t";
  90.                 $context["them_ids"] = [];
  91.                 // line 43
  92.                 yield "\t";
  93.                 $context['_parent'] = $context;
  94.                 $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["article"]) || array_key_exists("article"$context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.'43$this->source); })()), "extension", [], "any"falsefalsefalse43), "excerpt", [], "any"falsefalsefalse43), "categories", [], "any"falsefalsefalse43));
  95.                 foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
  96.                     // line 44
  97.                     yield "\t\t";
  98.                     $context["them_ids"] = Twig\Extension\CoreExtension::merge((isset($context["them_ids"]) || array_key_exists("them_ids"$context) ? $context["them_ids"] : (function () { throw new RuntimeError('Variable "them_ids" does not exist.'44$this->source); })()), [CoreExtension::getAttribute($this->env$this->source$context["category"], "id", [], "any"falsefalsefalse44)]);
  99.                     // line 45
  100.                     yield "\t";
  101.                 }
  102.                 $_parent $context['_parent'];
  103.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['category'], $context['_parent'], $context['loop']);
  104.                 $context array_intersect_key($context$_parent) + $_parent;
  105.                 // line 46
  106.                 yield "\t";
  107.                 $context["categoryColor"] = "";
  108.                 // line 47
  109.                 yield "\t";
  110.                 if ((CoreExtension::getAttribute($this->env$this->source, ($context["them_ids"] ?? null), 0, [], "array"truetruefalse47) &&  !(null === CoreExtension::getAttribute($this->env$this->source, (isset($context["them_ids"]) || array_key_exists("them_ids"$context) ? $context["them_ids"] : (function () { throw new RuntimeError('Variable "them_ids" does not exist.'47$this->source); })()), 0, [], "array"falsefalsefalse47)))) {
  111.                     // line 48
  112.                     yield "\t\t";
  113.                     $context["categoryColor"] = CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$this->extensions['App\Twig\LoadCategoriesByIdsExtension']->fetchCategory(CoreExtension::getAttribute($this->env$this->source, (isset($context["them_ids"]) || array_key_exists("them_ids"$context) ? $context["them_ids"] : (function () { throw new RuntimeError('Variable "them_ids" does not exist.'48$this->source); })()), 0, [], "array"falsefalsefalse48), "fr"), "entity", [], "any"falsefalsefalse48), "color", [], "any"falsefalsefalse48);
  114.                     // line 49
  115.                     yield "\t";
  116.                 }
  117.                 // line 50
  118.                 yield "\t";
  119.                 if ((CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, ($context["article"] ?? null), "content", [], "any"falsetruefalse50), "main_category", [], "any"truetruefalse50) &&  !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::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); })()), "content", [], "any"falsefalsefalse50), "main_category", [], "any"falsefalsefalse50)))) {
  120.                     // line 51
  121.                     yield "\t\t";
  122.                     $context["categoryColor"] = CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$this->extensions['App\Twig\LoadCategoriesByIdsExtension']->fetchCategory(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["article"]) || array_key_exists("article"$context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.'51$this->source); })()), "content", [], "any"falsefalsefalse51), "main_category", [], "any"falsefalsefalse51), "id", [], "any"falsefalsefalse51), "fr"), "entity", [], "any"falsefalsefalse51), "color", [], "any"falsefalsefalse51);
  123.                     // line 52
  124.                     yield "\t";
  125.                 }
  126.                 // line 53
  127.                 yield "\t";
  128.                 $context["categoryColor"] = (((isset($context["categoryColor"]) || array_key_exists("categoryColor"$context) ? $context["categoryColor"] : (function () { throw new RuntimeError('Variable "categoryColor" does not exist.'53$this->source); })())) ?: ("#354161"));
  129.                 // line 54
  130.                 yield "\t";
  131.                 $context["type_territoire"] = "";
  132.                 // line 55
  133.                 yield "\t";
  134.                 if ((CoreExtension::getAttribute($this->env$this->source, ($context["article"] ?? null), "type_territoire", [], "any"truetruefalse55) &&  !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.'55$this->source); })()), "type_territoire", [], "any"falsefalsefalse55)))) {
  135.                     // line 56
  136.                     yield "\t\t";
  137.                     $context["type_territoire"] = 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.'56$this->source); })()), "type_territoire", [], "any"falsefalsefalse56);
  138.                     // line 57
  139.                     yield "\t";
  140.                 }
  141.                 // line 58
  142.                 yield "
  143. \t<div class=\"preview-container ";
  144.                 // line 59
  145.                 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.'59$this->source); })()), "template", [], "any"falsefalsefalse59), "html"nulltrue);
  146.                 yield " br8 dflex fdc\" data-uuid=\"";
  147.                 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.'59$this->source); })()), "uuid", [], "any"falsefalsefalse59), "html"nulltrue);
  148.                 yield "\" data-theme=\"";
  149.                 yield json_encode((isset($context["them_ids"]) || array_key_exists("them_ids"$context) ? $context["them_ids"] : (function () { throw new RuntimeError('Variable "them_ids" does not exist.'59$this->source); })()));
  150.                 yield "\" data-main-color=\"";
  151.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["categoryColor"]) || array_key_exists("categoryColor"$context) ? $context["categoryColor"] : (function () { throw new RuntimeError('Variable "categoryColor" does not exist.'59$this->source); })()), "html"nulltrue);
  152.                 yield "\" ";
  153.                 if ((CoreExtension::getAttribute($this->env$this->source, ($context["article"] ?? null), "content", [], "any"truetruefalse59) && CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, ($context["article"] ?? null), "content", [], "any"falsetruefalse59), "title", [], "any"truetruefalse59))) {
  154.                     yield " data-title=\"";
  155.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["article"]) || array_key_exists("article"$context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.'59$this->source); })()), "content", [], "any"falsefalsefalse59), "title", [], "any"falsefalsefalse59), "html"nulltrue);
  156.                     yield "\" ";
  157.                 }
  158.                 yield " ";
  159.                 if (((CoreExtension::getAttribute($this->env$this->source, ($context["article"] ?? null), "content", [], "any"truetruefalse59) && CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, ($context["article"] ?? null), "content", [], "any"falsetruefalse59), "adresse", [], "any"truetruefalse59)) &&  !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["article"]) || array_key_exists("article"$context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.'59$this->source); })()), "content", [], "any"falsefalsefalse59), "adresse", [], "any"falsefalsefalse59)))) {
  160.                     yield " data-lat=\"";
  161.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["article"]) || array_key_exists("article"$context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.'59$this->source); })()), "content", [], "any"falsefalsefalse59), "adresse", [], "any"falsefalsefalse59), 1, [], "array"falsefalsefalse59), "html"nulltrue);
  162.                     yield "\" data-long=\"";
  163.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["article"]) || array_key_exists("article"$context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.'59$this->source); })()), "content", [], "any"falsefalsefalse59), "adresse", [], "any"falsefalsefalse59), 2, [], "array"falsefalsefalse59), "html"nulltrue);
  164.                     yield "\" ";
  165.                 }
  166.                 yield " ";
  167.                 if ((CoreExtension::getAttribute($this->env$this->source, ($context["article"] ?? null), "content", [], "any"truetruefalse59) && CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, ($context["article"] ?? null), "content", [], "any"falsetruefalse59), "type_territoire", [], "any"truetruefalse59))) {
  168.                     yield " data-type=\"";
  169.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["article"]) || array_key_exists("article"$context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.'59$this->source); })()), "content", [], "any"falsefalsefalse59), "type_territoire", [], "any"falsefalsefalse59), "html"nulltrue);
  170.                     yield "\" ";
  171.                 }
  172.                 yield " ";
  173.                 if (((CoreExtension::getAttribute($this->env$this->source, ($context["article"] ?? null), "content", [], "any"truetruefalse59) && CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, ($context["article"] ?? null), "content", [], "any"falsetruefalse59), "header_img", [], "any"truetruefalse59)) &&  !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["article"]) || array_key_exists("article"$context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.'59$this->source); })()), "content", [], "any"falsefalsefalse59), "header_img", [], "any"falsefalsefalse59)))) {
  174.                     yield " data-header-img=\"";
  175.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["article"]) || array_key_exists("article"$context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.'59$this->source); })()), "content", [], "any"falsefalsefalse59), "header_img", [], "any"falsefalsefalse59), "url", [], "any"falsefalsefalse59), "html"nulltrue);
  176.                     yield "\" ";
  177.                 }
  178.                 yield " ";
  179.                 if (((CoreExtension::getAttribute($this->env$this->source, ($context["article"] ?? null), "content", [], "any"truetruefalse59) && CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, ($context["article"] ?? null), "content", [], "any"falsetruefalse59), "departement", [], "any"truetruefalse59)) &&  !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["article"]) || array_key_exists("article"$context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.'59$this->source); })()), "content", [], "any"falsefalsefalse59), "departement", [], "any"falsefalsefalse59)))) {
  180.                     yield " data-departement=\"";
  181.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["article"]) || array_key_exists("article"$context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.'59$this->source); })()), "content", [], "any"falsefalsefalse59), "departement", [], "any"falsefalsefalse59), "html"nulltrue);
  182.                     yield "\" ";
  183.                 }
  184.                 yield " ";
  185.                 if (((=== 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.'59$this->source); })()), "template", [], "any"falsefalsefalse59), "experiences")) || (=== 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.'59$this->source); })()), "template", [], "any"falsefalsefalse59), "fiches_territoires")))) {
  186.                     yield " data-html=\"";
  187.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(base64_encode(json_encode(Twig\Extension\CoreExtension::include($this->env$context"api/api_experience_search.html.twig", ["header_img" => CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["article"]) || array_key_exists("article"$context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.'59$this->source); })()), "content", [], "any"falsefalsefalse59), "header_img", [], "any"falsefalsefalse59), "categories" => (isset($context["them_ids"]) || array_key_exists("them_ids"$context) ? $context["them_ids"] : (function () { throw new RuntimeError('Variable "them_ids" does not exist.'59$this->source); })()), "departement" => CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["article"]) || array_key_exists("article"$context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.'59$this->source); })()), "content", [], "any"falsefalsefalse59), "departement", [], "any"falsefalsefalse59), "title" => (isset($context["title"]) || array_key_exists("title"$context) ? $context["title"] : (function () { throw new RuntimeError('Variable "title" does not exist.'59$this->source); })()), "url" => (isset($context["routePath"]) || array_key_exists("routePath"$context) ? $context["routePath"] : (function () { throw new RuntimeError('Variable "routePath" does not exist.'59$this->source); })())]))), "html"nulltrue);
  188.                     yield "\" ";
  189.                 }
  190.                 yield ">
  191. \t\t";
  192.                 // line 60
  193.                 if ((((=== 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.'60$this->source); })()), "template", [], "any"falsefalsefalse60), "articles")) || (=== 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.'60$this->source); })()), "template", [], "any"falsefalsefalse60), "analyses"))) || (=== 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.'60$this->source); })()), "template", [], "any"falsefalsefalse60), "guides_outils")))) {
  194.                     // line 61
  195.                     yield "\t\t\t";
  196.                     yield from                     $this->loadTemplate("api/blocks/articles-preview-content.html.twig""api/blocks/api_search_render.html.twig"61)->unwrap()->yield($context);
  197.                     // line 62
  198.                     yield "\t\t";
  199.                 } elseif ((=== 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.'62$this->source); })()), "template", [], "any"falsefalsefalse62), "agenda"))) {
  200.                     // line 63
  201.                     yield "\t\t\t";
  202.                     yield from                     $this->loadTemplate("api/blocks/agenda-preview-content.html.twig""api/blocks/api_search_render.html.twig"63)->unwrap()->yield($context);
  203.                     // line 64
  204.                     yield "\t\t";
  205.                 } elseif ((=== 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.'64$this->source); })()), "template", [], "any"falsefalsefalse64), "newsletters"))) {
  206.                     // line 65
  207.                     yield "\t\t\t";
  208.                     yield from                     $this->loadTemplate("api/blocks/newsletters-preview-content.html.twig""api/blocks/api_search_render.html.twig"65)->unwrap()->yield($context);
  209.                     // line 66
  210.                     yield "\t\t";
  211.                 } elseif ((=== 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.'66$this->source); })()), "template", [], "any"falsefalsefalse66), "offres"))) {
  212.                     // line 67
  213.                     yield "\t\t\t";
  214.                     yield from                     $this->loadTemplate("api/blocks/offres-preview-content.html.twig""api/blocks/api_search_render.html.twig"67)->unwrap()->yield($context);
  215.                     // line 68
  216.                     yield "\t\t";
  217.                 } elseif ((=== 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.'68$this->source); })()), "template", [], "any"falsefalsefalse68), "aapami"))) {
  218.                     // line 69
  219.                     yield "\t\t\t";
  220.                     yield from                     $this->loadTemplate("api/blocks/aapami-preview-content.html.twig""api/blocks/api_search_render.html.twig"69)->unwrap()->yield($context);
  221.                     // line 70
  222.                     yield "\t\t";
  223.                 } elseif ((=== 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.'70$this->source); })()), "template", [], "any"falsefalsefalse70), "fiches_territoires"))) {
  224.                     // line 71
  225.                     yield "        ";
  226.                     if ((array_key_exists("isSearch"$context) && (isset($context["isSearch"]) || array_key_exists("isSearch"$context) ? $context["isSearch"] : (function () { throw new RuntimeError('Variable "isSearch" does not exist.'71$this->source); })()))) {
  227.                         // line 72
  228.                         yield "\t\t\t\t";
  229.                         yield from                         $this->loadTemplate("api/blocks/territory-only-preview.html.twig""api/blocks/api_search_render.html.twig"72)->unwrap()->yield($context);
  230.                         // line 73
  231.                         yield "\t\t\t";
  232.                     } else {
  233.                         // line 74
  234.                         yield "\t\t\t    ";
  235.                         yield from                         $this->loadTemplate("api/blocks/territoire-preview-content.html.twig""api/blocks/api_search_render.html.twig"74)->unwrap()->yield($context);
  236.                         // line 75
  237.                         yield "\t\t\t";
  238.                     }
  239.                     // line 76
  240.                     yield "\t\t";
  241.                 } elseif ((=== 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.'76$this->source); })()), "template", [], "any"falsefalsefalse76), "experiences"))) {
  242.                     // line 77
  243.                     yield "\t\t\t";
  244.                     if ((array_key_exists("isSearch"$context) && (isset($context["isSearch"]) || array_key_exists("isSearch"$context) ? $context["isSearch"] : (function () { throw new RuntimeError('Variable "isSearch" does not exist.'77$this->source); })()))) {
  245.                         // line 78
  246.                         yield "\t\t\t\t";
  247.                         yield from                         $this->loadTemplate("api/blocks/experience-only-preview.html.twig""api/blocks/api_search_render.html.twig"78)->unwrap()->yield($context);
  248.                         // line 79
  249.                         yield "\t\t\t";
  250.                     } else {
  251.                         // line 80
  252.                         yield "\t\t\t\t";
  253.                         yield from                         $this->loadTemplate("api/blocks/experience-map-preview.html.twig""api/blocks/api_search_render.html.twig"80)->unwrap()->yield($context);
  254.                         // line 81
  255.                         yield "\t\t\t";
  256.                     }
  257.                     // line 82
  258.                     yield "\t\t";
  259.                 }
  260.                 // line 83
  261.                 yield "\t</div>
  262. ";
  263.             }
  264.         }
  265.         
  266.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  267.         
  268.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  269.         return; yield '';
  270.     }
  271.     /**
  272.      * @codeCoverageIgnore
  273.      */
  274.     public function getTemplateName()
  275.     {
  276.         return "api/blocks/api_search_render.html.twig";
  277.     }
  278.     /**
  279.      * @codeCoverageIgnore
  280.      */
  281.     public function isTraitable()
  282.     {
  283.         return false;
  284.     }
  285.     /**
  286.      * @codeCoverageIgnore
  287.      */
  288.     public function getDebugInfo()
  289.     {
  290.         return array (  270 => 83,  267 => 82,  264 => 81,  261 => 80,  258 => 79,  255 => 78,  252 => 77,  249 => 76,  246 => 75,  243 => 74,  240 => 73,  237 => 72,  234 => 71,  231 => 70,  228 => 69,  225 => 68,  222 => 67,  219 => 66,  216 => 65,  213 => 64,  210 => 63,  207 => 62,  204 => 61,  202 => 60,  154 => 59,  151 => 58,  148 => 57,  145 => 56,  142 => 55,  139 => 54,  136 => 53,  133 => 52,  130 => 51,  127 => 50,  124 => 49,  121 => 48,  118 => 47,  115 => 46,  109 => 45,  106 => 44,  101 => 43,  98 => 42,  96 => 27,  94 => 26,  91 => 25,  87 => 23,  85 => 22,  81 => 20,  79 => 19,  75 => 17,  73 => 16,  69 => 14,  67 => 13,  63 => 11,  61 => 10,  57 => 8,  55 => 7,  51 => 5,  49 => 4,  48 => 3,  46 => 2,  44 => 1,);
  291.     }
  292.     public function getSourceContext()
  293.     {
  294.         return new Source("{% set article = safe_content_load(id) %}
  295. {% if article is not null %}
  296. {% if article.author is defined and article.author is not empty and
  297. \tarticle.author.contact is defined and article.author.contact is not empty %}
  298. \t{% set author = sulu_resolve_user(article.author).contact.fullName %}
  299. {% endif %}
  300. {% if article.content is defined and article.content is not empty %}
  301. \t{% set articleContent = article.content %}
  302. {% endif %}
  303. {% if article.extension.excerpt.categories is defined and article.extension.excerpt.categories is not empty %}
  304. \t{% set categories = article.extension.excerpt.categories %}
  305. {% endif %}
  306. {% if articleContent.chapo is defined and articleContent.chapo is not empty %}
  307. \t{% set chapo = articleContent.chapo %}
  308. {% endif %}
  309. {% if articleContent.routePath is defined and articleContent.routePath is not empty %}
  310. \t{% set routePath = articleContent.routePath %}
  311. {% endif %}
  312. {% if articleContent.title is defined and articleContent.title is not empty %}
  313. \t{% set title = articleContent.title %}
  314. {% endif %}
  315. {% if articleContent.front_title is defined and articleContent.front_title is not empty %}
  316. \t{% set title = articleContent.front_title %}
  317. {% endif %}
  318. {% if article.template is defined and article.template is not empty %}
  319. \t{# 
  320. \t\t        category = {
  321. \t\t            id: number, 
  322. \t\t            key: string, 
  323. \t\t            name: string, 
  324. \t\t            description: ?string, 
  325. \t\t            meta: array, 
  326. \t\t            keywords: array, 
  327. \t\t            defaultLocale: string,
  328. \t\t            creator: string,
  329. \t\t            changer: string,
  330. \t\t            created: Datetime,
  331. \t\t            changed: Datetime
  332. \t\t        }
  333. \t\t    #}
  334. \t{% set them_ids = [] %}
  335. \t{% for category in article.extension.excerpt.categories %}
  336. \t\t{% set them_ids = them_ids|merge([category.id]) %}
  337. \t{% endfor %}
  338. \t{% set categoryColor = '' %}
  339. \t{% if them_ids[0] is defined and them_ids[0] is not null %}
  340. \t\t{% set categoryColor = load_category_by_id(them_ids[0], 'fr').entity.color %}
  341. \t{% endif %}
  342. \t{% if article.content.main_category is defined and article.content.main_category is not empty %}
  343. \t\t{% set categoryColor = load_category_by_id(article.content.main_category.id, 'fr').entity.color %}
  344. \t{% endif %}
  345. \t{% set categoryColor = categoryColor ?: '#354161' %}
  346. \t{% set type_territoire = '' %}
  347. \t{% if article.type_territoire is defined and article.type_territoire is not empty %}
  348. \t\t{% set type_territoire = article.type_territoire %}
  349. \t{% endif %}
  350. \t<div class=\"preview-container {{ article.template }} br8 dflex fdc\" data-uuid=\"{{ article.uuid }}\" data-theme=\"{{them_ids|json_encode|raw}}\" data-main-color=\"{{ categoryColor }}\" {% if article.content is defined and article.content.title is defined %} data-title=\"{{ article.content.title }}\" {% endif %} {% if article.content is defined and article.content.adresse is defined and article.content.adresse is not empty %} data-lat=\"{{ article.content.adresse[1] }}\" data-long=\"{{ article.content.adresse[2] }}\" {% endif %} {% if article.content is defined and article.content.type_territoire is defined %} data-type=\"{{ article.content.type_territoire }}\" {% endif %} {% if article.content is defined and article.content.header_img is defined and article.content.header_img is not empty %} data-header-img=\"{{ article.content.header_img.url }}\" {% endif %} {% if article.content is defined and article.content.departement is defined and article.content.departement is not empty %} data-departement=\"{{ article.content.departement }}\" {% endif %} {% if article.template == \"experiences\" or article.template == \"fiches_territoires\" %} data-html=\"{{ include('api/api_experience_search.html.twig', { header_img: article.content.header_img, categories: them_ids, departement: article.content.departement, title: title, url: routePath }) | json_encode | base64_encode }}\" {% endif %}>
  351. \t\t{% if article.template == \"articles\" or article.template == \"analyses\" or article.template == \"guides_outils\" %}
  352. \t\t\t{% include \"api/blocks/articles-preview-content.html.twig\" %}
  353. \t\t{% elseif article.template == \"agenda\" %}
  354. \t\t\t{% include \"api/blocks/agenda-preview-content.html.twig\" %}
  355. \t\t{% elseif article.template == \"newsletters\" %}
  356. \t\t\t{% include \"api/blocks/newsletters-preview-content.html.twig\" %}
  357. \t\t{% elseif article.template == \"offres\" %}
  358. \t\t\t{% include \"api/blocks/offres-preview-content.html.twig\" %}
  359. \t\t{% elseif article.template == \"aapami\" %}
  360. \t\t\t{% include \"api/blocks/aapami-preview-content.html.twig\" %}
  361. \t\t{% elseif article.template == \"fiches_territoires\" %}
  362.         {% if isSearch is defined and isSearch %}
  363. \t\t\t\t{% include \"api/blocks/territory-only-preview.html.twig\" %}
  364. \t\t\t{% else %}
  365. \t\t\t    {% include \"api/blocks/territoire-preview-content.html.twig\" %}
  366. \t\t\t{% endif %}
  367. \t\t{% elseif article.template == \"experiences\" %}
  368. \t\t\t{% if isSearch is defined and isSearch %}
  369. \t\t\t\t{% include \"api/blocks/experience-only-preview.html.twig\" %}
  370. \t\t\t{% else %}
  371. \t\t\t\t{% include \"api/blocks/experience-map-preview.html.twig\" %}
  372. \t\t\t{% endif %}
  373. \t\t{% endif %}
  374. \t</div>
  375. {% endif %}
  376. {% endif %}
  377. ""api/blocks/api_search_render.html.twig""/var/www/html/templates/api/blocks/api_search_render.html.twig");
  378.     }
  379. }