var/cache/website/dev/twig/12/124371177079c841badf0811716a945c13c9edbe2bbd71870ea831d3d83cac0b.php line 38

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. use Twig\TemplateWrapper;
  15. /* includes/blocks.html.twig */
  16. class __TwigTemplate_467e251c89c6de04ed79419df7ffb9423f6fc66f2f07d2bf27ca423f6b243a19 extends Template
  17. {
  18.     private Source $source;
  19.     /**
  20.      * @var array<string, Template>
  21.      */
  22.     private array $macros = [];
  23.     public function __construct(Environment $env)
  24.     {
  25.         parent::__construct($env);
  26.         $this->source $this->getSourceContext();
  27.         $this->parent false;
  28.         $this->blocks = [
  29.         ];
  30.     }
  31.     protected function doDisplay(array $context, array $blocks = []): iterable
  32.     {
  33.         $macros $this->macros;
  34.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  35.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""includes/blocks.html.twig"));
  36.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  37.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""includes/blocks.html.twig"));
  38.         // line 1
  39.         $context["title"] = ((CoreExtension::getAttribute($this->env$this->source, ($context["content"] ?? null), "title", [], "any"truetruefalse1)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env$this->source, ($context["content"] ?? null), "title", [], "any"falsefalsefalse1))) : (""));
  40.         // line 2
  41.         yield "
  42. ";
  43.         // line 3
  44.         if (Twig\Extension\CoreExtension::length($this->env->getCharset(), ((CoreExtension::getAttribute($this->env$this->source, ($context["content"] ?? null), "blocks", [], "any"truetruefalse3)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env$this->source, ($context["content"] ?? null), "blocks", [], "any"falsefalsefalse3), [])) : ([])))) {
  45.             // line 4
  46.             yield "    ";
  47.             $context["n"] = 0;
  48.             // line 5
  49.             yield "    <section class=\"blocks-section\">
  50.         ";
  51.             // line 6
  52.             $context['_parent'] = $context;
  53.             $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.'6$this->source); })()), "blocks", [], "any"falsefalsefalse6));
  54.             $context['loop'] = [
  55.               'parent' => $context['_parent'],
  56.               'index0' => 0,
  57.               'index'  => 1,
  58.               'first'  => true,
  59.             ];
  60.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  61.                 $length count($context['_seq']);
  62.                 $context['loop']['revindex0'] = $length 1;
  63.                 $context['loop']['revindex'] = $length;
  64.                 $context['loop']['length'] = $length;
  65.                 $context['loop']['last'] = === $length;
  66.             }
  67.             foreach ($context['_seq'] as $context["_key"] => $context["block"]) {
  68.                 // line 7
  69.                 yield "            ";
  70.                 $context["n"] = ((isset($context["n"]) || array_key_exists("n"$context) ? $context["n"] : (function () { throw new RuntimeError('Variable "n" does not exist.'7$this->source); })()) + 1);
  71.                 yield "   
  72.            
  73.             ";
  74.                 // line 10
  75.                 yield "                ";
  76.                 if ((CoreExtension::getAttribute($this->env$this->source$context["block"], "type", [], "any"falsefalsefalse10) == "texte")) {
  77.                     // line 11
  78.                     yield "                ";
  79.                     yield from $this->loadTemplate((("includes/blocks/" CoreExtension::getAttribute($this->env$this->source$context["block"], "type", [], "any"falsefalsefalse11)) . ".html.twig"), "includes/blocks.html.twig"11)->unwrap()->yield(CoreExtension::toArray(["content" =>                     // line 12
  80. $context["block"], "view" => CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source,                     // line 13
  81. (isset($context["view"]) || array_key_exists("view"$context) ? $context["view"] : (function () { throw new RuntimeError('Variable "view" does not exist.'13$this->source); })()), "blocks", [], "any"falsefalsefalse13), CoreExtension::getAttribute($this->env$this->source$context["loop"], "index0", [], "any"falsefalsefalse13), [], "array"falsefalsefalse13)]));
  82.                     // line 15
  83.                     yield "                ";
  84.                 } elseif (((CoreExtension::getAttribute($this->env$this->source$context["block"], "type", [], "any"falsefalsefalse15) == "image") && ((isset($context["n"]) || array_key_exists("n"$context) ? $context["n"] : (function () { throw new RuntimeError('Variable "n" does not exist.'15$this->source); })()) == 1))) {
  85.                     // line 16
  86.                     yield "                ";
  87.                 } elseif ((CoreExtension::getAttribute($this->env$this->source$context["block"], "type", [], "any"falsefalsefalse16) == "faq")) {
  88.                     // line 17
  89.                     yield "                   
  90.                 ";
  91.                 } else {
  92.                     // line 19
  93.                     yield "                   
  94.                     <div class=\"blocks__item block-";
  95.                     // line 20
  96.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["block"], "type", [], "any"falsefalsefalse20), "html"nulltrue);
  97.                     yield " \" id=\"\">
  98.                         ";
  99.                     // line 21
  100.                     yield from $this->loadTemplate((("includes/blocks/" CoreExtension::getAttribute($this->env$this->source$context["block"], "type", [], "any"falsefalsefalse21)) . ".html.twig"), "includes/blocks.html.twig"21)->unwrap()->yield(CoreExtension::toArray(["content" =>                     // line 22
  101. $context["block"], "view" => CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source,                     // line 23
  102. (isset($context["view"]) || array_key_exists("view"$context) ? $context["view"] : (function () { throw new RuntimeError('Variable "view" does not exist.'23$this->source); })()), "blocks", [], "any"falsefalsefalse23), CoreExtension::getAttribute($this->env$this->source$context["loop"], "index0", [], "any"falsefalsefalse23), [], "array"falsefalsefalse23)]));
  103.                     // line 25
  104.                     yield "                    </div>
  105.                    
  106.                 ";
  107.                 }
  108.                 // line 28
  109.                 yield "            ";
  110.                 // line 29
  111.                 yield "          
  112.          
  113.         ";
  114.                 ++$context['loop']['index0'];
  115.                 ++$context['loop']['index'];
  116.                 $context['loop']['first'] = false;
  117.                 if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  118.                     --$context['loop']['revindex0'];
  119.                     --$context['loop']['revindex'];
  120.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  121.                 }
  122.             }
  123.             $_parent $context['_parent'];
  124.             unset($context['_seq'], $context['_key'], $context['block'], $context['_parent'], $context['loop']);
  125.             $context array_intersect_key($context$_parent) + $_parent;
  126.             // line 32
  127.             yield "        ";
  128.             if (((isset($context["title"]) || array_key_exists("title"$context) ? $context["title"] : (function () { throw new RuntimeError('Variable "title" does not exist.'32$this->source); })()) == "Horaires & Tarifs")) {
  129.                 // line 33
  130.                 yield "            <div class=\"row\">
  131.                 <div class=\"col text-center pt-3 pb-3\">
  132.                     <a href=\"/details\" class=\"btn btn-link transition-bgcolor bg-green-s minw-sm\">Réserver!</a>
  133.                 </div>
  134.             </div>
  135.         ";
  136.             }
  137.             // line 39
  138.             yield "    </section>
  139.     
  140. ";
  141.         }
  142.         // line 42
  143.         yield "
  144.  ";
  145.         // line 43
  146.         if (((isset($context["title"]) || array_key_exists("title"$context) ? $context["title"] : (function () { throw new RuntimeError('Variable "title" does not exist.'43$this->source); })()) == "Faq")) {
  147.             yield 
  148.         <div class=\"bloc-faq-page py-4\">
  149.             <div class=\"max-container-4\">
  150.             ";
  151.             // line 46
  152.             if (Twig\Extension\CoreExtension::length($this->env->getCharset(), ((CoreExtension::getAttribute($this->env$this->source, ($context["content"] ?? null), "blocks", [], "any"truetruefalse46)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env$this->source, ($context["content"] ?? null), "blocks", [], "any"falsefalsefalse46), [])) : ([])))) {
  153.                 // line 47
  154.                 yield "            <div class=\"faq-accordion pt-2\" id=\"accordion\">
  155.                 ";
  156.                 // line 48
  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.'48$this->source); })()), "blocks", [], "any"falsefalsefalse48));
  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["block"]) {
  173.                     // line 49
  174.                     yield "                    ";
  175.                     if ((CoreExtension::getAttribute($this->env$this->source$context["block"], "type", [], "any"falsefalsefalse49) == "faq")) {
  176.                         // line 50
  177.                         yield "                    ";
  178.                         yield from $this->loadTemplate((("includes/blocks/" CoreExtension::getAttribute($this->env$this->source$context["block"], "type", [], "any"falsefalsefalse50)) . ".html.twig"), "includes/blocks.html.twig"50)->unwrap()->yield(CoreExtension::toArray(["content" =>                         // line 51
  179. $context["block"], "view" => CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source,                         // line 52
  180. (isset($context["view"]) || array_key_exists("view"$context) ? $context["view"] : (function () { throw new RuntimeError('Variable "view" does not exist.'52$this->source); })()), "blocks", [], "any"falsefalsefalse52), CoreExtension::getAttribute($this->env$this->source$context["loop"], "index0", [], "any"falsefalsefalse52), [], "array"falsefalsefalse52)]));
  181.                         // line 54
  182.                         yield "                    ";
  183.                     }
  184.                     // line 55
  185.                     yield "                ";
  186.                     ++$context['loop']['index0'];
  187.                     ++$context['loop']['index'];
  188.                     $context['loop']['first'] = false;
  189.                     if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  190.                         --$context['loop']['revindex0'];
  191.                         --$context['loop']['revindex'];
  192.                         $context['loop']['last'] = === $context['loop']['revindex0'];
  193.                     }
  194.                 }
  195.                 $_parent $context['_parent'];
  196.                 unset($context['_seq'], $context['_key'], $context['block'], $context['_parent'], $context['loop']);
  197.                 $context array_intersect_key($context$_parent) + $_parent;
  198.                 // line 56
  199.                 yield "            </div>
  200.             
  201.         ";
  202.             }
  203.             // line 59
  204.             yield "        </div>
  205.     </div>
  206.     ";
  207.         }
  208.         
  209.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  210.         
  211.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  212.         yield from [];
  213.     }
  214.     /**
  215.      * @codeCoverageIgnore
  216.      */
  217.     public function getTemplateName(): string
  218.     {
  219.         return "includes/blocks.html.twig";
  220.     }
  221.     /**
  222.      * @codeCoverageIgnore
  223.      */
  224.     public function isTraitable(): bool
  225.     {
  226.         return false;
  227.     }
  228.     /**
  229.      * @codeCoverageIgnore
  230.      */
  231.     public function getDebugInfo(): array
  232.     {
  233.         return array (  213 => 59,  208 => 56,  194 => 55,  191 => 54,  189 => 52,  188 => 51,  186 => 50,  183 => 49,  166 => 48,  163 => 47,  161 => 46,  155 => 43,  152 => 42,  147 => 39,  139 => 33,  136 => 32,  120 => 29,  118 => 28,  113 => 25,  111 => 23,  110 => 22,  109 => 21,  105 => 20,  102 => 19,  98 => 17,  95 => 16,  92 => 15,  90 => 13,  89 => 12,  87 => 11,  84 => 10,  78 => 7,  61 => 6,  58 => 5,  55 => 4,  53 => 3,  50 => 2,  48 => 1,);
  234.     }
  235.     public function getSourceContext(): Source
  236.     {
  237.         return new Source("{% set title = content.title|default %}
  238. {% if content.blocks|default([])|length %}
  239.     {% set n = 0  %}
  240.     <section class=\"blocks-section\">
  241.         {% for block in content.blocks %}
  242.             {% set n = n + 1 %}   
  243.            
  244.             {#<div class=\"blocks__item block-{{block.type}} pt-2\" id=\"\">#}
  245.                 {% if block.type ==\"texte\" %}
  246.                 {% include 'includes/blocks/' ~ block.type ~ '.html.twig' with {
  247.                     content: block,
  248.                     view: view.blocks[loop.index0],
  249.                 } only %}
  250.                 {% elseif block.type ==\"image\" and n == 1 %}
  251.                 {% elseif block.type ==\"faq\" %}
  252.                    
  253.                 {% else %}
  254.                    
  255.                     <div class=\"blocks__item block-{{block.type}} \" id=\"\">
  256.                         {% include 'includes/blocks/' ~ block.type ~ '.html.twig' with {
  257.                         content: block,
  258.                         view: view.blocks[loop.index0],
  259.                     } only %}
  260.                     </div>
  261.                    
  262.                 {% endif %}
  263.             {#</div> #}
  264.           
  265.          
  266.         {% endfor %}
  267.         {% if title == 'Horaires & Tarifs' %}
  268.             <div class=\"row\">
  269.                 <div class=\"col text-center pt-3 pb-3\">
  270.                     <a href=\"/details\" class=\"btn btn-link transition-bgcolor bg-green-s minw-sm\">Réserver!</a>
  271.                 </div>
  272.             </div>
  273.         {% endif %}
  274.     </section>
  275.     
  276. {% endif %}
  277.  {% if  title == 'Faq'%} 
  278.         <div class=\"bloc-faq-page py-4\">
  279.             <div class=\"max-container-4\">
  280.             {% if content.blocks|default([])|length %}
  281.             <div class=\"faq-accordion pt-2\" id=\"accordion\">
  282.                 {% for block in content.blocks %}
  283.                     {% if block.type ==\"faq\" %}
  284.                     {% include 'includes/blocks/' ~ block.type ~ '.html.twig' with {
  285.                         content: block,
  286.                         view: view.blocks[loop.index0],
  287.                     } only %}
  288.                     {% endif %}
  289.                 {% endfor %}
  290.             </div>
  291.             
  292.         {% endif %}
  293.         </div>
  294.     </div>
  295.     {% endif %}""includes/blocks.html.twig""/home/coworking/www_preprod/templates/includes/blocks.html.twig");
  296.     }
  297. }