<?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;
/* fiche/_includes/etablissements-du-meme-groupe.html.twig */
class __TwigTemplate_30a5ec9abacb28abac24fa3647e77c8789c04bd9bf0ecc4cd9f7bc5da5352461 extends Template
{
private $source;
private $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 = [])
{
$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", "fiche/_includes/etablissements-du-meme-groupe.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "fiche/_includes/etablissements-du-meme-groupe.html.twig"));
// line 1
if (twig_get_attribute($this->env, $this->source, (isset($context["etablissement"]) || array_key_exists("etablissement", $context) ? $context["etablissement"] : (function () { throw new RuntimeError('Variable "etablissement" does not exist.', 1, $this->source); })()), "isClient", [], "any", false, false, false, 1)) {
// line 2
echo " ";
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["etablissement"] ?? null), "gestionnaire", [], "any", false, true, false, 2), "id", [], "any", true, true, false, 2)) {
// line 3
echo " ";
$context["idGestionnaire"] = twig_get_attribute($this->env, $this->source, (isset($context["etablissement"]) || array_key_exists("etablissement", $context) ? $context["etablissement"] : (function () { throw new RuntimeError('Variable "etablissement" does not exist.', 3, $this->source); })()), "gestionnaire", [], "any", false, false, false, 3);
// line 4
echo " ";
if ( !(null === (isset($context["idGestionnaire"]) || array_key_exists("idGestionnaire", $context) ? $context["idGestionnaire"] : (function () { throw new RuntimeError('Variable "idGestionnaire" does not exist.', 4, $this->source); })()))) {
// line 5
echo " ";
$context["geres"] = twig_get_attribute($this->env, $this->source, (isset($context["idGestionnaire"]) || array_key_exists("idGestionnaire", $context) ? $context["idGestionnaire"] : (function () { throw new RuntimeError('Variable "idGestionnaire" does not exist.', 5, $this->source); })()), "geres", [], "any", false, false, false, 5);
// line 6
echo " <div class=\"estabs\">
<h2>Autres établissements du groupe</h2>
<ul>
";
// line 9
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_array_filter($this->env, (isset($context["geres"]) || array_key_exists("geres", $context) ? $context["geres"] : (function () { throw new RuntimeError('Variable "geres" does not exist.', 9, $this->source); })()), function ($__e__) use ($context, $macros) { $context["e"] = $__e__; return twig_get_attribute($this->env, $this->source, $context["e"], "actif", [], "any", false, false, false, 9); }));
foreach ($context['_seq'] as $context["_key"] => $context["e"]) {
// line 10
echo " ";
if ((0 !== twig_compare(twig_get_attribute($this->env, $this->source, $context["e"], "id", [], "any", false, false, false, 10), twig_get_attribute($this->env, $this->source, (isset($context["etablissement"]) || array_key_exists("etablissement", $context) ? $context["etablissement"] : (function () { throw new RuntimeError('Variable "etablissement" does not exist.', 10, $this->source); })()), "id", [], "any", false, false, false, 10)))) {
// line 11
echo " <li>
";
// line 12
$context["urlFiche"] = twig_get_attribute($this->env, $this->source, (isset($context["pathBuilder"]) || array_key_exists("pathBuilder", $context) ? $context["pathBuilder"] : (function () { throw new RuntimeError('Variable "pathBuilder" does not exist.', 12, $this->source); })()), "buildFiche", [0 => $context["e"]], "method", false, false, false, 12);
// line 13
echo " ";
if ($this->extensions['App\Twig\TypeEtablissementExtension']->type(twig_get_attribute($this->env, $this->source, $context["e"], "type", [], "any", false, false, false, 13))) {
echo " ";
echo $this->extensions['App\Twig\TypeEtablissementExtension']->type(twig_get_attribute($this->env, $this->source, $context["e"], "type", [], "any", false, false, false, 13));
} else {
echo "<span class=\"composition-internat\">internat</span>";
}
echo "<br>
<a href=\"";
// line 14
echo twig_escape_filter($this->env, (isset($context["urlFiche"]) || array_key_exists("urlFiche", $context) ? $context["urlFiche"] : (function () { throw new RuntimeError('Variable "urlFiche" does not exist.', 14, $this->source); })()), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["e"], "denomination", [], "any", false, false, false, 14), "html", null, true);
echo " </a>
</li>
";
}
// line 17
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['e'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 18
echo " </ul>
</div>
";
}
// line 21
echo " ";
} else {
// line 22
echo " ";
if (((0 === twig_compare(twig_get_attribute($this->env, $this->source, (isset($context["etablissement"]) || array_key_exists("etablissement", $context) ? $context["etablissement"] : (function () { throw new RuntimeError('Variable "etablissement" does not exist.', 22, $this->source); })()), "typeClient", [], "any", false, false, false, 22), "établissement")) && !(null === (isset($context["internatLie"]) || array_key_exists("internatLie", $context) ? $context["internatLie"] : (function () { throw new RuntimeError('Variable "internatLie" does not exist.', 22, $this->source); })())))) {
// line 23
echo " <div class=\"estabs\">
<h2>Autres établissements du groupe</h2>
<ul>
<li>
";
// line 27
$context["urlFiche"] = twig_get_attribute($this->env, $this->source, (isset($context["pathBuilder"]) || array_key_exists("pathBuilder", $context) ? $context["pathBuilder"] : (function () { throw new RuntimeError('Variable "pathBuilder" does not exist.', 27, $this->source); })()), "buildFiche", [0 => (isset($context["internatLie"]) || array_key_exists("internatLie", $context) ? $context["internatLie"] : (function () { throw new RuntimeError('Variable "internatLie" does not exist.', 27, $this->source); })())], "method", false, false, false, 27);
// line 28
echo " <span class=\"composition-internat\">internat</span><br>
<a href=\"";
// line 29
echo twig_escape_filter($this->env, (isset($context["urlFiche"]) || array_key_exists("urlFiche", $context) ? $context["urlFiche"] : (function () { throw new RuntimeError('Variable "urlFiche" does not exist.', 29, $this->source); })()), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["internatLie"]) || array_key_exists("internatLie", $context) ? $context["internatLie"] : (function () { throw new RuntimeError('Variable "internatLie" does not exist.', 29, $this->source); })()), "denomination", [], "any", false, false, false, 29), "html", null, true);
echo " </a>
</li>
</ul>
</div>
";
} elseif (((0 === twig_compare(twig_get_attribute($this->env, $this->source, // line 33
(isset($context["etablissement"]) || array_key_exists("etablissement", $context) ? $context["etablissement"] : (function () { throw new RuntimeError('Variable "etablissement" does not exist.', 33, $this->source); })()), "typeClient", [], "any", false, false, false, 33), "internat")) && !(null === (isset($context["etsLie"]) || array_key_exists("etsLie", $context) ? $context["etsLie"] : (function () { throw new RuntimeError('Variable "etsLie" does not exist.', 33, $this->source); })())))) {
// line 34
echo " <div class=\"estabs\">
<h2>Autres établissements du groupe</h2>
<ul>
<li>
";
// line 38
$context["urlFiche"] = twig_get_attribute($this->env, $this->source, (isset($context["pathBuilder"]) || array_key_exists("pathBuilder", $context) ? $context["pathBuilder"] : (function () { throw new RuntimeError('Variable "pathBuilder" does not exist.', 38, $this->source); })()), "buildFiche", [0 => (isset($context["etsLie"]) || array_key_exists("etsLie", $context) ? $context["etsLie"] : (function () { throw new RuntimeError('Variable "etsLie" does not exist.', 38, $this->source); })())], "method", false, false, false, 38);
// line 39
echo " ";
echo $this->extensions['App\Twig\TypeEtablissementExtension']->type(twig_get_attribute($this->env, $this->source, (isset($context["etsLie"]) || array_key_exists("etsLie", $context) ? $context["etsLie"] : (function () { throw new RuntimeError('Variable "etsLie" does not exist.', 39, $this->source); })()), "type", [], "any", false, false, false, 39));
echo "<br>
<a href=\"";
// line 40
echo twig_escape_filter($this->env, (isset($context["urlFiche"]) || array_key_exists("urlFiche", $context) ? $context["urlFiche"] : (function () { throw new RuntimeError('Variable "urlFiche" does not exist.', 40, $this->source); })()), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["etsLie"]) || array_key_exists("etsLie", $context) ? $context["etsLie"] : (function () { throw new RuntimeError('Variable "etsLie" does not exist.', 40, $this->source); })()), "denomination", [], "any", false, false, false, 40), "html", null, true);
echo " </a>
</li>
</ul>
</div>
";
}
// line 45
echo " ";
}
}
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "fiche/_includes/etablissements-du-meme-groupe.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 154 => 45, 144 => 40, 139 => 39, 137 => 38, 131 => 34, 129 => 33, 120 => 29, 117 => 28, 115 => 27, 109 => 23, 106 => 22, 103 => 21, 98 => 18, 92 => 17, 84 => 14, 74 => 13, 72 => 12, 69 => 11, 66 => 10, 62 => 9, 57 => 6, 54 => 5, 51 => 4, 48 => 3, 45 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% if etablissement.isClient %}
{% if etablissement.gestionnaire.id is defined %}
{% set idGestionnaire = etablissement.gestionnaire %}
{% if idGestionnaire is not null %}
{% set geres = idGestionnaire.geres %}
<div class=\"estabs\">
<h2>Autres établissements du groupe</h2>
<ul>
{% for e in geres | filter ( e => e.actif ) %}
{% if e.id != etablissement.id %}
<li>
{% set urlFiche = pathBuilder.buildFiche(e) %}
{% if typeEtablissement(e.type) %} {{typeEtablissement(e.type) | raw }}{% else %}<span class=\"composition-internat\">internat</span>{% endif %}<br>
<a href=\"{{ urlFiche }}\">{{ e.denomination }} </a>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
{% endif %}
{% else %}
{% if etablissement.typeClient == 'établissement' and internatLie is not null %}
<div class=\"estabs\">
<h2>Autres établissements du groupe</h2>
<ul>
<li>
{% set urlFiche = pathBuilder.buildFiche(internatLie) %}
<span class=\"composition-internat\">internat</span><br>
<a href=\"{{ urlFiche }}\">{{ internatLie.denomination }} </a>
</li>
</ul>
</div>
{% elseif etablissement.typeClient == 'internat' and etsLie is not null %}
<div class=\"estabs\">
<h2>Autres établissements du groupe</h2>
<ul>
<li>
{% set urlFiche = pathBuilder.buildFiche(etsLie) %}
{{typeEtablissement(etsLie.type) | raw }}<br>
<a href=\"{{ urlFiche }}\">{{ etsLie.denomination }} </a>
</li>
</ul>
</div>
{% endif %}
{% endif %}
{% endif %}
", "fiche/_includes/etablissements-du-meme-groupe.html.twig", "/app/templates/fiche/_includes/etablissements-du-meme-groupe.html.twig");
}
}