var/cache/website/dev/twig/da/da04e4bb676a259d4201f045159b1946d36b991d50934ad9edd91cf3a971e872.php line 44

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