<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
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;
/* pages/contact.html.twig */
class __TwigTemplate_cc336e189742d0292353e56d925565ae45ef28269d4794b85b68ee54685ec372 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "base.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$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", "pages/contact.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "pages/contact.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "pages/contact.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 3
public function block_content($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 4
echo "
";
// line 7
$this->loadTemplate("fragments/_banner.html.twig", "pages/contact.html.twig", 7)->display($context);
// line 8
echo " ";
if (twig_get_attribute($this->env, $this->source, (isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 8, $this->source); })()), "article", [], "any", false, false, false, 8)) {
// line 9
echo " <div class=\"container-fluid intro dark\">
<div class=\"container\">
<div class=\"row justify-content-center\">
<div class=\"col-12 mb-3 p-5\">
";
// line 13
echo twig_get_attribute($this->env, $this->source, (isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 13, $this->source); })()), "article", [], "any", false, false, false, 13);
echo "
</div>
</div>
</div>
</div>
";
}
// line 19
echo " ";
$context["markers"] = [];
// line 20
echo " <section class=\"container my-5\">
<div class=\"row justify-content-center\">
<div class=\"col-lg-5\">
<h2 class=\"fs-2 mb-4 text-primary border-bottom border-primary border-2 pb-3\">";
// line 23
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Contactez-nous", [], "messages");
echo "</h2>
";
// line 24
if ((0 !== twig_compare(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 24, $this->source); })()), "request", [], "any", false, false, false, 24), "get", [0 => "send"], "method", false, false, false, 24), "true"))) {
// line 25
echo " ";
// line 26
echo " ";
$this->env->getRuntime("Symfony\\Component\\Form\\FormRenderer")->setTheme(twig_get_attribute($this->env, $this->source, (isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 26, $this->source); })()), "form", [], "any", false, false, false, 26), [0 => "form_theme.html.twig"], true);
// line 27
echo " ";
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock(twig_get_attribute($this->env, $this->source, (isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 27, $this->source); })()), "form", [], "any", false, false, false, 27), 'form', ["attr" => ["class" => "row"]]);
echo "
";
} else {
// line 30
echo " <div class=\"alert alert-success\">
<h3 class=\"alert-heading fs-4 m-0\">";
// line 31
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Message envoyé", [], "messages");
echo "</h3>
";
// line 32
echo twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["view"]) || array_key_exists("view", $context) ? $context["view"] : (function () { throw new RuntimeError('Variable "view" does not exist.', 32, $this->source); })()), "form", [], "any", false, false, false, 32), "entity", [], "any", false, false, false, 32), "successText", [], "any", false, false, false, 32);
echo "
</div>
";
}
// line 34
echo "
</div>
<div class=\"col-lg-7 agences\">
<h2 class=\"fs-2 mb-4 text-primary border-bottom border-primary border-2 pb-3\">";
// line 37
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Nos agences", [], "messages");
echo "</h2>
";
// line 38
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 38, $this->source); })()), "accounts", [], "any", false, false, false, 38));
foreach ($context['_seq'] as $context["_key"] => $context["account"]) {
// line 39
echo " <div class=\"account mb-3 card border-0 anim-fade anim-stagger\">
<div class=\"card-header text-center border-primary\">
<h2 class=\"fs-4 m-0\">";
// line 41
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["account"], "name", [], "any", false, false, false, 41), "html", null, true);
echo "</h2>
</div>
<div class=\"card-body d-lg-flex\">
";
// line 44
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["account"], "addresses", [], "any", false, false, false, 44));
$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["address"]) {
// line 45
echo " <div class=\"col-lg-4 adresse px-4 anim-fade-";
echo (((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 45) % 2 != 0)) ? ("right") : ("left"));
echo "\">
<h3 class=\"card-title fs-6 fw-bold\">";
// line 46
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["address"], "title", [], "any", false, false, false, 46), "html", null, true);
echo "</h3>
";
// line 47
echo twig_join_filter([0 => twig_get_attribute($this->env, $this->source, $context["address"], "street", [], "any", false, false, false, 47), 1 => twig_join_filter([0 => twig_get_attribute($this->env, $this->source, $context["address"], "zip", [], "any", false, false, false, 47), 1 => twig_get_attribute($this->env, $this->source, $context["address"], "city", [], "any", false, false, false, 47)], " - ")], " ", " <br> ");
echo "
<br>
";
// line 49
if (twig_get_attribute($this->env, $this->source, $context["address"], "note", [], "any", false, false, false, 49)) {
echo "<i class=\"fa fa-mobile-alt me-3\"></i>";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["address"], "note", [], "any", false, false, false, 49), "html", null, true);
}
// line 50
echo " </div>
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['address'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 52
echo " </div>
</div>
";
// line 54
$context["markers"] = twig_array_merge((isset($context["markers"]) || array_key_exists("markers", $context) ? $context["markers"] : (function () { throw new RuntimeError('Variable "markers" does not exist.', 54, $this->source); })()), twig_array_map($this->env, twig_get_attribute($this->env, $this->source, $context["account"], "addresses", [], "any", false, false, false, 54), function ($__a__) use ($context, $macros) { $context["a"] = $__a__; return ["lat" => twig_get_attribute($this->env, $this->source, (isset($context["a"]) || array_key_exists("a", $context) ? $context["a"] : (function () { throw new RuntimeError('Variable "a" does not exist.', 54, $this->source); })()), "latitude", [], "any", false, false, false, 54), "lng" => twig_get_attribute($this->env, $this->source, (isset($context["a"]) || array_key_exists("a", $context) ? $context["a"] : (function () { throw new RuntimeError('Variable "a" does not exist.', 54, $this->source); })()), "longitude", [], "any", false, false, false, 54), "adresse" => twig_join_filter([0 => twig_get_attribute($this->env, $this->source, (isset($context["a"]) || array_key_exists("a", $context) ? $context["a"] : (function () { throw new RuntimeError('Variable "a" does not exist.', 54, $this->source); })()), "street", [], "any", false, false, false, 54), 1 => twig_get_attribute($this->env, $this->source, (isset($context["a"]) || array_key_exists("a", $context) ? $context["a"] : (function () { throw new RuntimeError('Variable "a" does not exist.', 54, $this->source); })()), "zip", [], "any", false, false, false, 54), 2 => twig_get_attribute($this->env, $this->source, (isset($context["a"]) || array_key_exists("a", $context) ? $context["a"] : (function () { throw new RuntimeError('Variable "a" does not exist.', 54, $this->source); })()), "city", [], "any", false, false, false, 54)], " ")]; }));
// line 55
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['account'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 56
echo " </div>
</div>
</section>
<section class=\"container-fluid\">
<div class=\"row\">
<div class=\"col-12 p-0\">
<div class=\"map\" id=\"map-contact\" data-markers=\"";
// line 65
echo twig_escape_filter($this->env, json_encode(((array_key_exists("markers", $context)) ? (_twig_default_filter((isset($context["markers"]) || array_key_exists("markers", $context) ? $context["markers"] : (function () { throw new RuntimeError('Variable "markers" does not exist.', 65, $this->source); })()), [])) : ([]))), "html", null, true);
echo "\" data-object=\"map\">
</div>
</div>
</div>
</section>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "pages/contact.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 229 => 65, 218 => 56, 212 => 55, 210 => 54, 206 => 52, 191 => 50, 186 => 49, 181 => 47, 177 => 46, 172 => 45, 155 => 44, 149 => 41, 145 => 39, 141 => 38, 137 => 37, 132 => 34, 126 => 32, 122 => 31, 119 => 30, 112 => 27, 109 => 26, 107 => 25, 105 => 24, 101 => 23, 96 => 20, 93 => 19, 84 => 13, 78 => 9, 75 => 8, 73 => 7, 68 => 4, 58 => 3, 35 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends \"base.html.twig\" %}
{% block content %}
{% include \"fragments/_banner.html.twig\" %}
{% if content.article %}
<div class=\"container-fluid intro dark\">
<div class=\"container\">
<div class=\"row justify-content-center\">
<div class=\"col-12 mb-3 p-5\">
{{ content.article|raw }}
</div>
</div>
</div>
</div>
{% endif %}
{% set markers = [] %}
<section class=\"container my-5\">
<div class=\"row justify-content-center\">
<div class=\"col-lg-5\">
<h2 class=\"fs-2 mb-4 text-primary border-bottom border-primary border-2 pb-3\">{% trans %}Contactez-nous{% endtrans %}</h2>
{% if app.request.get('send') != 'true' %}
{# FORM THEME #}
{% form_theme content.form 'form_theme.html.twig' %}
{{ form(content.form, {attr:{'class':'row'}}) }}
{% else %}
<div class=\"alert alert-success\">
<h3 class=\"alert-heading fs-4 m-0\">{% trans %}Message envoyé{% endtrans %}</h3>
{{ view.form.entity.successText|raw }}
</div>
{% endif %}
</div>
<div class=\"col-lg-7 agences\">
<h2 class=\"fs-2 mb-4 text-primary border-bottom border-primary border-2 pb-3\">{% trans %}Nos agences{% endtrans %}</h2>
{% for account in content.accounts %}
<div class=\"account mb-3 card border-0 anim-fade anim-stagger\">
<div class=\"card-header text-center border-primary\">
<h2 class=\"fs-4 m-0\">{{ account.name }}</h2>
</div>
<div class=\"card-body d-lg-flex\">
{% for address in account.addresses %}
<div class=\"col-lg-4 adresse px-4 anim-fade-{{ loop.index is odd ? 'right' : 'left' }}\">
<h3 class=\"card-title fs-6 fw-bold\">{{ address.title }}</h3>
{{ [address.street,[address.zip,address.city]|join(' - ')]|join(' ',' <br> ')|raw }}
<br>
{% if address.note %}<i class=\"fa fa-mobile-alt me-3\"></i>{{ address.note }}{% endif %}
</div>
{% endfor %}
</div>
</div>
{% set markers = markers|merge(account.addresses|map(a => {lat:a.latitude,lng:a.longitude,adresse:[a.street,a.zip,a.city]|join(' ')})) %}
{% endfor %}
</div>
</div>
</section>
<section class=\"container-fluid\">
<div class=\"row\">
<div class=\"col-12 p-0\">
<div class=\"map\" id=\"map-contact\" data-markers=\"{{ markers|default([])|json_encode }}\" data-object=\"map\">
</div>
</div>
</div>
</section>
{% endblock %}
", "pages/contact.html.twig", "/var/www/vhosts/fereol-depannage.com/preprod.fereol-depannage.com/templates/pages/contact.html.twig");
}
}