var/cache/website/dev/twig/de/de4db5c59e432c2d5d727b897aa490be3fe8872ea4bb65ed00b13654dd05beb1.php line 155

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. /* articles/articles.html.twig */
  15. class __TwigTemplate_ad28aab8d143ef96bea6a769f0ed24d706f587a6242649c629a559b059d97c1e 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->blocks = [
  24.             'style' => [$this'block_style'],
  25.             'content' => [$this'block_content'],
  26.             'javascripts' => [$this'block_javascripts'],
  27.         ];
  28.     }
  29.     protected function doGetParent(array $context)
  30.     {
  31.         // line 1
  32.         return "base.html.twig";
  33.     }
  34.     protected function doDisplay(array $context, array $blocks = [])
  35.     {
  36.         $macros $this->macros;
  37.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  38.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""articles/articles.html.twig"));
  39.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  40.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""articles/articles.html.twig"));
  41.         $this->parent $this->loadTemplate("base.html.twig""articles/articles.html.twig"1);
  42.         yield from $this->parent->unwrap()->yield($contextarray_merge($this->blocks$blocks));
  43.         
  44.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  45.         
  46.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  47.     }
  48.     // line 3
  49.     public function block_style($context, array $blocks = [])
  50.     {
  51.         $macros $this->macros;
  52.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  53.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""style"));
  54.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  55.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""style"));
  56.         // line 4
  57.         yield "    ";
  58.         yield from $this->yieldParentBlock("style"$context$blocks);
  59.         yield "
  60.     ";
  61.         // line 5
  62.         yield from         $this->loadTemplate("articles/styles/base-css-logic.html.twig""articles/articles.html.twig"5)->unwrap()->yield($context);
  63.         
  64.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  65.         
  66.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  67.         return; yield '';
  68.     }
  69.     // line 7
  70.     public function block_content($context, array $blocks = [])
  71.     {
  72.         $macros $this->macros;
  73.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  74.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  75.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  76.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  77.         // line 8
  78.         yield "    ";
  79.         $context["name"] = "";
  80.         // line 9
  81.         yield "    ";
  82.         if ((CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, ($context["app"] ?? null), "request", [], "any"falsetruefalse9), "attributes", [], "any"falsetruefalse9), "get", ["structure"], "method"falsetruefalse9), "structure", [], "any"falsetruefalse9), "name", [], "any"truetruefalse9) &&  !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'9$this->source); })()), "request", [], "any"falsefalsefalse9), "attributes", [], "any"falsefalsefalse9), "get", ["structure"], "method"falsefalsefalse9), "structure", [], "any"falsefalsefalse9), "name", [], "any"falsefalsefalse9)))) {
  83.             // line 10
  84.             yield "        ";
  85.             $context["name"] = CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'10$this->source); })()), "request", [], "any"falsefalsefalse10), "attributes", [], "any"falsefalsefalse10), "get", ["structure"], "method"falsefalsefalse10), "structure", [], "any"falsefalsefalse10), "name", [], "any"falsefalsefalse10);
  86.             // line 11
  87.             yield "    ";
  88.         }
  89.         // line 12
  90.         yield "    ";
  91.         $context["values"] = "";
  92.         // line 13
  93.         yield "    ";
  94.         if ((=== CoreExtension::compare((isset($context["name"]) || array_key_exists("name"$context) ? $context["name"] : (function () { throw new RuntimeError('Variable "name" does not exist.'13$this->source); })()), "guides_outils"))) {
  95.             // line 14
  96.             yield "        ";
  97.             $context["values"] = ["Ressources""Guides et outils"];
  98.             // line 15
  99.             yield "    ";
  100.         } elseif ((=== CoreExtension::compare((isset($context["name"]) || array_key_exists("name"$context) ? $context["name"] : (function () { throw new RuntimeError('Variable "name" does not exist.'15$this->source); })()), "analyses"))) {
  101.             // line 16
  102.             yield "        ";
  103.             $context["values"] = ["Ressources""Analyses"];
  104.             // line 17
  105.             yield "    ";
  106.         } else {
  107.             // line 18
  108.             yield "        ";
  109.             $context["values"] = ["Actualités""Articles"];
  110.             // line 19
  111.             yield "    ";
  112.         }
  113.         // line 20
  114.         yield "    ";
  115.         yield from         $this->loadTemplate("articles-blocks/breadcrumb.html.twig""articles/articles.html.twig"20)->unwrap()->yield(CoreExtension::merge($context, ["titles" => (isset($context["values"]) || array_key_exists("values"$context) ? $context["values"] : (function () { throw new RuntimeError('Variable "values" does not exist.'20$this->source); })())]));
  116.         // line 21
  117.         yield "    <div class=\"main-container w100 plr-1em\">
  118.         <section class=\"single-article-container\">
  119.             <article>
  120.                 ";
  121.         // line 24
  122.         yield from         $this->loadTemplate("articles-blocks/header.html.twig""articles/articles.html.twig"24)->unwrap()->yield($context);
  123.         // line 25
  124.         yield "                ";
  125.         // line 26
  126.         yield "                ";
  127.         yield from         $this->loadTemplate("articles/blocks/article-under-header.html.twig""articles/articles.html.twig"26)->unwrap()->yield($context);
  128.         // line 27
  129.         yield "                ";
  130.         if ((CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, ($context["extension"] ?? null), "excerpt", [], "any"falsetruefalse27), "categories", [], "any"truetruefalse27) &&  !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["extension"]) || array_key_exists("extension"$context) ? $context["extension"] : (function () { throw new RuntimeError('Variable "extension" does not exist.'27$this->source); })()), "excerpt", [], "any"falsefalsefalse27), "categories", [], "any"falsefalsefalse27)))) {
  131.             // line 28
  132.             yield "                    ";
  133.             $context["categories"] = CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["extension"]) || array_key_exists("extension"$context) ? $context["extension"] : (function () { throw new RuntimeError('Variable "extension" does not exist.'28$this->source); })()), "excerpt", [], "any"falsefalsefalse28), "categories", [], "any"falsefalsefalse28);
  134.             // line 29
  135.             yield "                    ";
  136.             yield from             $this->loadTemplate("blocks/previews-from-controller/blocks/categories.html.twig""articles/articles.html.twig"29)->unwrap()->yield($context);
  137.             // line 30
  138.             yield "                ";
  139.         }
  140.         // line 31
  141.         yield "                ";
  142.         if ((CoreExtension::getAttribute($this->env$this->source, ($context["content"] ?? null), "chapo", [], "any"truetruefalse31) &&  !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env$this->source, (isset($context["content"]) || array_key_exists("content"$context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.'31$this->source); })()), "chapo", [], "any"falsefalsefalse31)))) {
  143.             // line 32
  144.             yield "                    <div class=\"fw500 lh28 fs20 text cgrey mt-40px\">
  145.                         ";
  146.             // line 33
  147.             yield CoreExtension::getAttribute($this->env$this->source, (isset($context["content"]) || array_key_exists("content"$context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.'33$this->source); })()), "chapo", [], "any"falsefalsefalse33);
  148.             yield "
  149.                     </div>
  150.                 ";
  151.         }
  152.         // line 36
  153.         yield "                ";
  154.         if (((CoreExtension::getAttribute($this->env$this->source, ($context["content"] ?? null), "main_content", [], "any"truetruefalse36) &&  !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env$this->source, (isset($context["content"]) || array_key_exists("content"$context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.'36$this->source); })()), "main_content", [], "any"falsefalsefalse36))) && (=== CoreExtension::compare(Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env$this->source, (isset($context["content"]) || array_key_exists("content"$context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.'36$this->source); })()), "main_content", [], "any"falsefalsefalse36)), 0)))) {
  155.             // line 37
  156.             yield "                    ";
  157.             $context['_parent'] = $context;
  158.             $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env$this->source, (isset($context["content"]) || array_key_exists("content"$context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.'37$this->source); })()), "main_content", [], "any"falsefalsefalse37));
  159.             $context['loop'] = [
  160.               'parent' => $context['_parent'],
  161.               'index0' => 0,
  162.               'index'  => 1,
  163.               'first'  => true,
  164.             ];
  165.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  166.                 $length count($context['_seq']);
  167.                 $context['loop']['revindex0'] = $length 1;
  168.                 $context['loop']['revindex'] = $length;
  169.                 $context['loop']['length'] = $length;
  170.                 $context['loop']['last'] = === $length;
  171.             }
  172.             foreach ($context['_seq'] as $context["_key"] => $context["data"]) {
  173.                 // line 38
  174.                 yield "                        ";
  175.                 if ((=== CoreExtension::compare(CoreExtension::getAttribute($this->env$this->source$context["data"], "type", [], "any"falsefalsefalse38), "sub_content"))) {
  176.                     // line 39
  177.                     yield "                            ";
  178.                     yield from                     $this->loadTemplate("articles-blocks/articles-content.html.twig""articles/articles.html.twig"39)->unwrap()->yield($context);
  179.                     // line 40
  180.                     yield "                        ";
  181.                 }
  182.                 // line 41
  183.                 yield "                        ";
  184.                 if ((=== CoreExtension::compare(CoreExtension::getAttribute($this->env$this->source$context["data"], "type", [], "any"falsefalsefalse41), "linked_with"))) {
  185.                     // line 42
  186.                     yield "                            ";
  187.                     yield from                     $this->loadTemplate("articles-blocks/linked-with.html.twig""articles/articles.html.twig"42)->unwrap()->yield($context);
  188.                     // line 43
  189.                     yield "                        ";
  190.                 }
  191.                 // line 44
  192.                 yield "                        ";
  193.                 if ((=== CoreExtension::compare(CoreExtension::getAttribute($this->env$this->source$context["data"], "type", [], "any"falsefalsefalse44), "see_more"))) {
  194.                     // line 45
  195.                     yield "                            ";
  196.                     yield from                     $this->loadTemplate("articles-blocks/see-more.html.twig""articles/articles.html.twig"45)->unwrap()->yield($context);
  197.                     // line 46
  198.                     yield "                        ";
  199.                 }
  200.                 // line 47
  201.                 yield "                    ";
  202.                 ++$context['loop']['index0'];
  203.                 ++$context['loop']['index'];
  204.                 $context['loop']['first'] = false;
  205.                 if (isset($context['loop']['length'])) {
  206.                     --$context['loop']['revindex0'];
  207.                     --$context['loop']['revindex'];
  208.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  209.                 }
  210.             }
  211.             $_parent $context['_parent'];
  212.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['data'], $context['_parent'], $context['loop']);
  213.             $context array_intersect_key($context$_parent) + $_parent;
  214.             // line 48
  215.             yield "                ";
  216.         }
  217.         // line 49
  218.         yield "            </article>
  219.         </section>
  220.     </div>
  221. ";
  222.         
  223.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  224.         
  225.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  226.         return; yield '';
  227.     }
  228.     // line 53
  229.     public function block_javascripts($context, array $blocks = [])
  230.     {
  231.         $macros $this->macros;
  232.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  233.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  234.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  235.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  236.         // line 54
  237.         yield "    ";
  238.         yield from         $this->loadTemplate("articles/javascripts/base-article-js.html.twig""articles/articles.html.twig"54)->unwrap()->yield($context);
  239.         // line 55
  240.         yield "    ";
  241.         yield from $this->yieldParentBlock("javascripts"$context$blocks);
  242.         yield "
  243. ";
  244.         
  245.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  246.         
  247.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  248.         return; yield '';
  249.     }
  250.     /**
  251.      * @codeCoverageIgnore
  252.      */
  253.     public function getTemplateName()
  254.     {
  255.         return "articles/articles.html.twig";
  256.     }
  257.     /**
  258.      * @codeCoverageIgnore
  259.      */
  260.     public function isTraitable()
  261.     {
  262.         return false;
  263.     }
  264.     /**
  265.      * @codeCoverageIgnore
  266.      */
  267.     public function getDebugInfo()
  268.     {
  269.         return array (  264 => 55,  261 => 54,  251 => 53,  237 => 49,  234 => 48,  220 => 47,  217 => 46,  214 => 45,  211 => 44,  208 => 43,  205 => 42,  202 => 41,  199 => 40,  196 => 39,  193 => 38,  175 => 37,  172 => 36,  166 => 33,  163 => 32,  160 => 31,  157 => 30,  154 => 29,  151 => 28,  148 => 27,  145 => 26,  143 => 25,  141 => 24,  136 => 21,  133 => 20,  130 => 19,  127 => 18,  124 => 17,  121 => 16,  118 => 15,  115 => 14,  112 => 13,  109 => 12,  106 => 11,  103 => 10,  100 => 9,  97 => 8,  87 => 7,  76 => 5,  71 => 4,  61 => 3,  38 => 1,);
  270.     }
  271.     public function getSourceContext()
  272.     {
  273.         return new Source("{% extends \"base.html.twig\" %}
  274. {# extension.excerpt #}
  275. {% block style %}
  276.     {{ parent() }}
  277.     {% include \"articles/styles/base-css-logic.html.twig\" %}
  278. {% endblock %}
  279. {% block content %}
  280.     {% set name = \"\" %}
  281.     {% if app.request.attributes.get('structure').structure.name is defined and app.request.attributes.get('structure').structure.name is not empty %}
  282.         {% set name = app.request.attributes.get('structure').structure.name %}
  283.     {% endif %}
  284.     {% set values = \"\" %}
  285.     {% if name == \"guides_outils\" %}
  286.         {% set values = ['Ressources', 'Guides et outils'] %}
  287.     {% elseif name == \"analyses\" %}
  288.         {% set values = ['Ressources', 'Analyses'] %}
  289.     {% else %}
  290.         {% set values = ['Actualités', 'Articles'] %}
  291.     {% endif %}
  292.     {% include \"articles-blocks/breadcrumb.html.twig\" with {titles : values} %}
  293.     <div class=\"main-container w100 plr-1em\">
  294.         <section class=\"single-article-container\">
  295.             <article>
  296.                 {% include \"articles-blocks/header.html.twig\" %}
  297.                 {# <div class=\"creator\">{{ sulu_resolve_user(creator).fullName }}</div> #}
  298.                 {% include \"articles/blocks/article-under-header.html.twig\" %}
  299.                 {% if extension.excerpt.categories is defined and extension.excerpt.categories is not empty %}
  300.                     {% set categories = extension.excerpt.categories %}
  301.                     {% include \"blocks/previews-from-controller/blocks/categories.html.twig\" %}
  302.                 {% endif %}
  303.                 {% if content.chapo is defined and content.chapo is not empty %}
  304.                     <div class=\"fw500 lh28 fs20 text cgrey mt-40px\">
  305.                         {{ content.chapo|raw }}
  306.                     </div>
  307.                 {% endif %}
  308.                 {% if content.main_content is defined and content.main_content is not empty and content.main_content|length > 0 %}
  309.                     {% for data in content.main_content %}
  310.                         {% if data.type == \"sub_content\" %}
  311.                             {% include \"articles-blocks/articles-content.html.twig\" %}
  312.                         {% endif %}
  313.                         {% if data.type == \"linked_with\" %}
  314.                             {% include \"articles-blocks/linked-with.html.twig\" %}
  315.                         {% endif %}
  316.                         {% if data.type == \"see_more\" %}
  317.                             {% include \"articles-blocks/see-more.html.twig\" %}
  318.                         {% endif %}
  319.                     {% endfor %}
  320.                 {% endif %}
  321.             </article>
  322.         </section>
  323.     </div>
  324. {% endblock %}
  325. {% block javascripts %}
  326.     {% include \"articles/javascripts/base-article-js.html.twig\" %}
  327.     {{ parent() }}
  328. {% endblock %}""articles/articles.html.twig""/var/www/html/templates/articles/articles.html.twig");
  329.     }
  330. }