<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
/* includes/blocks.html.twig */
class __TwigTemplate_467e251c89c6de04ed79419df7ffb9423f6fc66f2f07d2bf27ca423f6b243a19 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "includes/blocks.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "includes/blocks.html.twig"));
// line 1
$context["title"] = ((CoreExtension::getAttribute($this->env, $this->source, ($context["content"] ?? null), "title", [], "any", true, true, false, 1)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, ($context["content"] ?? null), "title", [], "any", false, false, false, 1))) : (""));
// line 2
yield "
";
// line 3
if (Twig\Extension\CoreExtension::length($this->env->getCharset(), ((CoreExtension::getAttribute($this->env, $this->source, ($context["content"] ?? null), "blocks", [], "any", true, true, false, 3)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, ($context["content"] ?? null), "blocks", [], "any", false, false, false, 3), [])) : ([])))) {
// line 4
yield " ";
$context["n"] = 0;
// line 5
yield " <section class=\"blocks-section\">
";
// line 6
$context['_parent'] = $context;
$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", false, false, false, 6));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["block"]) {
// line 7
yield " ";
$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);
yield "
";
// line 10
yield " ";
if ((CoreExtension::getAttribute($this->env, $this->source, $context["block"], "type", [], "any", false, false, false, 10) == "texte")) {
// line 11
yield " ";
yield from $this->loadTemplate((("includes/blocks/" . CoreExtension::getAttribute($this->env, $this->source, $context["block"], "type", [], "any", false, false, false, 11)) . ".html.twig"), "includes/blocks.html.twig", 11)->unwrap()->yield(CoreExtension::toArray(["content" => // line 12
$context["block"], "view" => CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, // line 13
(isset($context["view"]) || array_key_exists("view", $context) ? $context["view"] : (function () { throw new RuntimeError('Variable "view" does not exist.', 13, $this->source); })()), "blocks", [], "any", false, false, false, 13), CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index0", [], "any", false, false, false, 13), [], "array", false, false, false, 13)]));
// line 15
yield " ";
} elseif (((CoreExtension::getAttribute($this->env, $this->source, $context["block"], "type", [], "any", false, false, false, 15) == "image") && ((isset($context["n"]) || array_key_exists("n", $context) ? $context["n"] : (function () { throw new RuntimeError('Variable "n" does not exist.', 15, $this->source); })()) == 1))) {
// line 16
yield " ";
} elseif ((CoreExtension::getAttribute($this->env, $this->source, $context["block"], "type", [], "any", false, false, false, 16) == "faq")) {
// line 17
yield "
";
} else {
// line 19
yield "
<div class=\"blocks__item block-";
// line 20
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["block"], "type", [], "any", false, false, false, 20), "html", null, true);
yield " \" id=\"\">
";
// line 21
yield from $this->loadTemplate((("includes/blocks/" . CoreExtension::getAttribute($this->env, $this->source, $context["block"], "type", [], "any", false, false, false, 21)) . ".html.twig"), "includes/blocks.html.twig", 21)->unwrap()->yield(CoreExtension::toArray(["content" => // line 22
$context["block"], "view" => CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, // line 23
(isset($context["view"]) || array_key_exists("view", $context) ? $context["view"] : (function () { throw new RuntimeError('Variable "view" does not exist.', 23, $this->source); })()), "blocks", [], "any", false, false, false, 23), CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index0", [], "any", false, false, false, 23), [], "array", false, false, false, 23)]));
// line 25
yield " </div>
";
}
// line 28
yield " ";
// line 29
yield "
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['block'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 32
yield " ";
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")) {
// line 33
yield " <div class=\"row\">
<div class=\"col text-center pt-3 pb-3\">
<a href=\"/details\" class=\"btn btn-link transition-bgcolor bg-green-s minw-sm\">Réserver!</a>
</div>
</div>
";
}
// line 39
yield " </section>
";
}
// line 42
yield "
";
// line 43
if (((isset($context["title"]) || array_key_exists("title", $context) ? $context["title"] : (function () { throw new RuntimeError('Variable "title" does not exist.', 43, $this->source); })()) == "Faq")) {
yield "
<div class=\"bloc-faq-page py-4\">
<div class=\"max-container-4\">
";
// line 46
if (Twig\Extension\CoreExtension::length($this->env->getCharset(), ((CoreExtension::getAttribute($this->env, $this->source, ($context["content"] ?? null), "blocks", [], "any", true, true, false, 46)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, ($context["content"] ?? null), "blocks", [], "any", false, false, false, 46), [])) : ([])))) {
// line 47
yield " <div class=\"faq-accordion pt-2\" id=\"accordion\">
";
// line 48
$context['_parent'] = $context;
$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", false, false, false, 48));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["block"]) {
// line 49
yield " ";
if ((CoreExtension::getAttribute($this->env, $this->source, $context["block"], "type", [], "any", false, false, false, 49) == "faq")) {
// line 50
yield " ";
yield from $this->loadTemplate((("includes/blocks/" . CoreExtension::getAttribute($this->env, $this->source, $context["block"], "type", [], "any", false, false, false, 50)) . ".html.twig"), "includes/blocks.html.twig", 50)->unwrap()->yield(CoreExtension::toArray(["content" => // line 51
$context["block"], "view" => CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, // line 52
(isset($context["view"]) || array_key_exists("view", $context) ? $context["view"] : (function () { throw new RuntimeError('Variable "view" does not exist.', 52, $this->source); })()), "blocks", [], "any", false, false, false, 52), CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index0", [], "any", false, false, false, 52), [], "array", false, false, false, 52)]));
// line 54
yield " ";
}
// line 55
yield " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['block'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 56
yield " </div>
";
}
// line 59
yield " </div>
</div>
";
}
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "includes/blocks.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
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,);
}
public function getSourceContext(): Source
{
return new Source("{% set title = content.title|default %}
{% if content.blocks|default([])|length %}
{% set n = 0 %}
<section class=\"blocks-section\">
{% for block in content.blocks %}
{% set n = n + 1 %}
{#<div class=\"blocks__item block-{{block.type}} pt-2\" id=\"\">#}
{% if block.type ==\"texte\" %}
{% include 'includes/blocks/' ~ block.type ~ '.html.twig' with {
content: block,
view: view.blocks[loop.index0],
} only %}
{% elseif block.type ==\"image\" and n == 1 %}
{% elseif block.type ==\"faq\" %}
{% else %}
<div class=\"blocks__item block-{{block.type}} \" id=\"\">
{% include 'includes/blocks/' ~ block.type ~ '.html.twig' with {
content: block,
view: view.blocks[loop.index0],
} only %}
</div>
{% endif %}
{#</div> #}
{% endfor %}
{% if title == 'Horaires & Tarifs' %}
<div class=\"row\">
<div class=\"col text-center pt-3 pb-3\">
<a href=\"/details\" class=\"btn btn-link transition-bgcolor bg-green-s minw-sm\">Réserver!</a>
</div>
</div>
{% endif %}
</section>
{% endif %}
{% if title == 'Faq'%}
<div class=\"bloc-faq-page py-4\">
<div class=\"max-container-4\">
{% if content.blocks|default([])|length %}
<div class=\"faq-accordion pt-2\" id=\"accordion\">
{% for block in content.blocks %}
{% if block.type ==\"faq\" %}
{% include 'includes/blocks/' ~ block.type ~ '.html.twig' with {
content: block,
view: view.blocks[loop.index0],
} only %}
{% endif %}
{% endfor %}
</div>
{% endif %}
</div>
</div>
{% endif %}", "includes/blocks.html.twig", "/home/coworking/www_preprod/templates/includes/blocks.html.twig");
}
}