var/cache/dev/twig/3e/3e23b05278e95d3fc96b9a6ea5a409a7cbe5e5d987f47a36a7b329053479ff90.php line 72

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* fiche/_includes/etablissements-du-meme-groupe.html.twig */
  14. class __TwigTemplate_30a5ec9abacb28abac24fa3647e77c8789c04bd9bf0ecc4cd9f7bc5da5352461 extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->parent false;
  23.         $this->blocks = [
  24.         ];
  25.     }
  26.     protected function doDisplay(array $context, array $blocks = [])
  27.     {
  28.         $macros $this->macros;
  29.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""fiche/_includes/etablissements-du-meme-groupe.html.twig"));
  31.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""fiche/_includes/etablissements-du-meme-groupe.html.twig"));
  33.         // line 1
  34.         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"falsefalsefalse1)) {
  35.             // line 2
  36.             echo "    ";
  37.             if (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["etablissement"] ?? null), "gestionnaire", [], "any"falsetruefalse2), "id", [], "any"truetruefalse2)) {
  38.                 // line 3
  39.                 echo "        ";
  40.                 $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"falsefalsefalse3);
  41.                 // line 4
  42.                 echo "        ";
  43.                 if ( !(null === (isset($context["idGestionnaire"]) || array_key_exists("idGestionnaire"$context) ? $context["idGestionnaire"] : (function () { throw new RuntimeError('Variable "idGestionnaire" does not exist.'4$this->source); })()))) {
  44.                     // line 5
  45.                     echo "            ";
  46.                     $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"falsefalsefalse5);
  47.                     // line 6
  48.                     echo "            <div class=\"estabs\">
  49.             <h2>Autres établissements du groupe</h2>
  50.             <ul>
  51.                 ";
  52.                     // line 9
  53.                     $context['_parent'] = $context;
  54.                     $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"falsefalsefalse9); }));
  55.                     foreach ($context['_seq'] as $context["_key"] => $context["e"]) {
  56.                         // line 10
  57.                         echo "                    ";
  58.                         if ((!== twig_compare(twig_get_attribute($this->env$this->source$context["e"], "id", [], "any"falsefalsefalse10), 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"falsefalsefalse10)))) {
  59.                             // line 11
  60.                             echo "                        <li>
  61.                             ";
  62.                             // line 12
  63.                             $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", [=> $context["e"]], "method"falsefalsefalse12);
  64.                             // line 13
  65.                             echo "                            ";
  66.                             if ($this->extensions['App\Twig\TypeEtablissementExtension']->type(twig_get_attribute($this->env$this->source$context["e"], "type", [], "any"falsefalsefalse13))) {
  67.                                 echo " ";
  68.                                 echo $this->extensions['App\Twig\TypeEtablissementExtension']->type(twig_get_attribute($this->env$this->source$context["e"], "type", [], "any"falsefalsefalse13));
  69.                             } else {
  70.                                 echo "<span class=\"composition-internat\">internat</span>";
  71.                             }
  72.                             echo "<br>
  73.                             <a href=\"";
  74.                             // line 14
  75.                             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"nulltrue);
  76.                             echo "\">";
  77.                             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["e"], "denomination", [], "any"falsefalsefalse14), "html"nulltrue);
  78.                             echo " </a>
  79.                         </li>
  80.                     ";
  81.                         }
  82.                         // line 17
  83.                         echo "                ";
  84.                     }
  85.                     $_parent $context['_parent'];
  86.                     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['e'], $context['_parent'], $context['loop']);
  87.                     $context array_intersect_key($context$_parent) + $_parent;
  88.                     // line 18
  89.                     echo "            </ul>
  90.             </div>
  91.         ";
  92.                 }
  93.                 // line 21
  94.                 echo "    ";
  95.             } else {
  96.                 // line 22
  97.                 echo "        ";
  98.                 if (((=== 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"falsefalsefalse22), "établissement")) &&  !(null === (isset($context["internatLie"]) || array_key_exists("internatLie"$context) ? $context["internatLie"] : (function () { throw new RuntimeError('Variable "internatLie" does not exist.'22$this->source); })())))) {
  99.                     // line 23
  100.                     echo "            <div class=\"estabs\">
  101.             <h2>Autres établissements du groupe</h2>
  102.             <ul>
  103.                 <li>
  104.                     ";
  105.                     // line 27
  106.                     $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", [=> (isset($context["internatLie"]) || array_key_exists("internatLie"$context) ? $context["internatLie"] : (function () { throw new RuntimeError('Variable "internatLie" does not exist.'27$this->source); })())], "method"falsefalsefalse27);
  107.                     // line 28
  108.                     echo "                    <span class=\"composition-internat\">internat</span><br>
  109.                     <a href=\"";
  110.                     // line 29
  111.                     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"nulltrue);
  112.                     echo "\">";
  113.                     echo twig_escape_filter($this->envtwig_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"falsefalsefalse29), "html"nulltrue);
  114.                     echo " </a>
  115.                 </li>
  116.             </ul>
  117.             </div>
  118.         ";
  119.                 } elseif (((=== twig_compare(twig_get_attribute($this->env$this->source,                 // line 33
  120. (isset($context["etablissement"]) || array_key_exists("etablissement"$context) ? $context["etablissement"] : (function () { throw new RuntimeError('Variable "etablissement" does not exist.'33$this->source); })()), "typeClient", [], "any"falsefalsefalse33), "internat")) &&  !(null === (isset($context["etsLie"]) || array_key_exists("etsLie"$context) ? $context["etsLie"] : (function () { throw new RuntimeError('Variable "etsLie" does not exist.'33$this->source); })())))) {
  121.                     // line 34
  122.                     echo "            <div class=\"estabs\">
  123.             <h2>Autres établissements du groupe</h2>
  124.             <ul>
  125.                 <li>
  126.                     ";
  127.                     // line 38
  128.                     $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", [=> (isset($context["etsLie"]) || array_key_exists("etsLie"$context) ? $context["etsLie"] : (function () { throw new RuntimeError('Variable "etsLie" does not exist.'38$this->source); })())], "method"falsefalsefalse38);
  129.                     // line 39
  130.                     echo "                    ";
  131.                     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"falsefalsefalse39));
  132.                     echo "<br>
  133.                     <a href=\"";
  134.                     // line 40
  135.                     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"nulltrue);
  136.                     echo "\">";
  137.                     echo twig_escape_filter($this->envtwig_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"falsefalsefalse40), "html"nulltrue);
  138.                     echo " </a>
  139.                 </li>
  140.             </ul>
  141.             </div>
  142.         ";
  143.                 }
  144.                 // line 45
  145.                 echo "    ";
  146.             }
  147.         }
  148.         
  149.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  150.         
  151.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  152.     }
  153.     public function getTemplateName()
  154.     {
  155.         return "fiche/_includes/etablissements-du-meme-groupe.html.twig";
  156.     }
  157.     public function isTraitable()
  158.     {
  159.         return false;
  160.     }
  161.     public function getDebugInfo()
  162.     {
  163.         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,);
  164.     }
  165.     public function getSourceContext()
  166.     {
  167.         return new Source("{% if etablissement.isClient %}
  168.     {% if etablissement.gestionnaire.id is defined %}
  169.         {% set idGestionnaire = etablissement.gestionnaire %}
  170.         {% if  idGestionnaire is not null %}
  171.             {% set geres = idGestionnaire.geres %}
  172.             <div class=\"estabs\">
  173.             <h2>Autres établissements du groupe</h2>
  174.             <ul>
  175.                 {% for e in geres | filter ( e => e.actif ) %}
  176.                     {% if e.id != etablissement.id %}
  177.                         <li>
  178.                             {% set urlFiche = pathBuilder.buildFiche(e) %}
  179.                             {% if typeEtablissement(e.type) %} {{typeEtablissement(e.type) | raw }}{% else %}<span class=\"composition-internat\">internat</span>{% endif %}<br>
  180.                             <a href=\"{{ urlFiche }}\">{{ e.denomination }} </a>
  181.                         </li>
  182.                     {% endif %}
  183.                 {% endfor %}
  184.             </ul>
  185.             </div>
  186.         {% endif %}
  187.     {% else %}
  188.         {% if etablissement.typeClient == 'établissement' and internatLie is not null %}
  189.             <div class=\"estabs\">
  190.             <h2>Autres établissements du groupe</h2>
  191.             <ul>
  192.                 <li>
  193.                     {% set urlFiche = pathBuilder.buildFiche(internatLie) %}
  194.                     <span class=\"composition-internat\">internat</span><br>
  195.                     <a href=\"{{ urlFiche }}\">{{ internatLie.denomination }} </a>
  196.                 </li>
  197.             </ul>
  198.             </div>
  199.         {% elseif etablissement.typeClient == 'internat' and etsLie is not null %}
  200.             <div class=\"estabs\">
  201.             <h2>Autres établissements du groupe</h2>
  202.             <ul>
  203.                 <li>
  204.                     {% set urlFiche = pathBuilder.buildFiche(etsLie) %}
  205.                     {{typeEtablissement(etsLie.type) | raw }}<br>
  206.                     <a href=\"{{ urlFiche }}\">{{ etsLie.denomination }} </a>
  207.                 </li>
  208.             </ul>
  209.             </div>
  210.         {% endif %}
  211.     {% endif %}
  212. {% endif %}
  213. ""fiche/_includes/etablissements-du-meme-groupe.html.twig""/app/templates/fiche/_includes/etablissements-du-meme-groupe.html.twig");
  214.     }
  215. }