var/cache/review/twig/73/73b010644c829078c4173c544bc04c99.php line 52

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. /* DistrictList/list.html.twig */
  14. class __TwigTemplate_fcce3a5daf672543daddd497c6f8447f 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->blocks = [
  23.             'leftSidebar' => [$this'block_leftSidebar'],
  24.             'mainContainer' => [$this'block_mainContainer'],
  25.         ];
  26.     }
  27.     protected function doGetParent(array $context)
  28.     {
  29.         // line 1
  30.         return "grid.html.twig";
  31.     }
  32.     protected function doDisplay(array $context, array $blocks = [])
  33.     {
  34.         $macros $this->macros;
  35.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  36.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""DistrictList/list.html.twig"));
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  38.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""DistrictList/list.html.twig"));
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  40.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""DistrictList/list.html.twig"));
  41.         $this->parent $this->loadTemplate("grid.html.twig""DistrictList/list.html.twig"1);
  42.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  43.         
  44.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  45.         
  46.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  47.         
  48.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  49.     }
  50.     // line 3
  51.     public function block_leftSidebar($context, array $blocks = [])
  52.     {
  53.         $macros $this->macros;
  54.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  55.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""leftSidebar"));
  56.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  57.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""leftSidebar"));
  58.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  59.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""leftSidebar"));
  60.         // line 4
  61.         echo "    ";
  62.         echo $this->extensions['Knp\Menu\Twig\MenuExtension']->render("left_compact_view", ["template" => "_menu/left_compact_view.html.twig"]);
  63.         echo "
  64. ";
  65.         
  66.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  67.         
  68.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  69.         
  70.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  71.     }
  72.     // line 7
  73.     public function block_mainContainer($context, array $blocks = [])
  74.     {
  75.         $macros $this->macros;
  76.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  77.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""mainContainer"));
  78.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  79.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""mainContainer"));
  80.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  81.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""mainContainer"));
  82.         // line 8
  83.         echo "    ";
  84.         if ((twig_length_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["city"]) || array_key_exists("city"$context) ? $context["city"] : (function () { throw new RuntimeError('Variable "city" does not exist.'8$this->source); })()), "counties", [], "any"falsefalsefalse8)) > 0)) {
  85.             // line 9
  86.             echo "        ";
  87.             $context['_parent'] = $context;
  88.             $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["city"]) || array_key_exists("city"$context) ? $context["city"] : (function () { throw new RuntimeError('Variable "city" does not exist.'9$this->source); })()), "counties", [], "any"falsefalsefalse9));
  89.             foreach ($context['_seq'] as $context["_key"] => $context["county"]) {
  90.                 // line 10
  91.                 echo "            ";
  92.                 $context["profilesCountInCounty"] = (((twig_get_attribute($this->env$this->source, ($context["count_by_counties"] ?? null), twig_get_attribute($this->env$this->source$context["county"], "id", [], "any"falsefalsefalse10), [], "array"truetruefalse10) &&  !(null === twig_get_attribute($this->env$this->source, ($context["count_by_counties"] ?? null), twig_get_attribute($this->env$this->source$context["county"], "id", [], "any"falsefalsefalse10), [], "array"falsefalsefalse10)))) ? (twig_get_attribute($this->env$this->source, ($context["count_by_counties"] ?? null), twig_get_attribute($this->env$this->source$context["county"], "id", [], "any"falsefalsefalse10), [], "array"falsefalsefalse10)) : (0));
  93.                 // line 11
  94.                 echo "            <h4>
  95.                 <a href=\"";
  96.                 // line 12
  97.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("profile_list.list_by_county", ["city" => twig_get_attribute($this->env$this->source, (isset($context["city"]) || array_key_exists("city"$context) ? $context["city"] : (function () { throw new RuntimeError('Variable "city" does not exist.'12$this->source); })()), "uriIdentity", [], "any"falsefalsefalse12), "county" => twig_get_attribute($this->env$this->source$context["county"], "uriIdentity", [], "any"falsefalsefalse12)]), "html"nulltrue);
  98.                 echo "\">";
  99.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env$this->source$context["county"], "name", [], "any"falsefalsefalse12)), "html"nulltrue);
  100.                 echo " (";
  101.                 echo twig_escape_filter($this->env, (isset($context["profilesCountInCounty"]) || array_key_exists("profilesCountInCounty"$context) ? $context["profilesCountInCounty"] : (function () { throw new RuntimeError('Variable "profilesCountInCounty" does not exist.'12$this->source); })()), "html"nulltrue);
  102.                 echo ")</a>
  103.             </h4>
  104.             <ul class=\"list-unstyled\">
  105.                 ";
  106.                 // line 15
  107.                 $context['_parent'] = $context;
  108.                 $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source$context["county"], "districts", [], "any"falsefalsefalse15));
  109.                 foreach ($context['_seq'] as $context["_key"] => $context["district"]) {
  110.                     // line 16
  111.                     echo "                    ";
  112.                     $context["profilesCount"] = (((twig_get_attribute($this->env$this->source, ($context["count_by_districts"] ?? null), twig_get_attribute($this->env$this->source$context["district"], "id", [], "any"falsefalsefalse16), [], "array"truetruefalse16) &&  !(null === twig_get_attribute($this->env$this->source, ($context["count_by_districts"] ?? null), twig_get_attribute($this->env$this->source$context["district"], "id", [], "any"falsefalsefalse16), [], "array"falsefalsefalse16)))) ? (twig_get_attribute($this->env$this->source, ($context["count_by_districts"] ?? null), twig_get_attribute($this->env$this->source$context["district"], "id", [], "any"falsefalsefalse16), [], "array"falsefalsefalse16)) : (0));
  113.                     // line 17
  114.                     echo "                    <li><a href=\"";
  115.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("profile_list.list_by_district", ["city" => twig_get_attribute($this->env$this->source, (isset($context["city"]) || array_key_exists("city"$context) ? $context["city"] : (function () { throw new RuntimeError('Variable "city" does not exist.'17$this->source); })()), "uriIdentity", [], "any"falsefalsefalse17), "district" => twig_get_attribute($this->env$this->source$context["district"], "uriIdentity", [], "any"falsefalsefalse17)]), "html"nulltrue);
  116.                     echo "\">";
  117.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env$this->source$context["district"], "name", [], "any"falsefalsefalse17)), "html"nulltrue);
  118.                     echo " (";
  119.                     echo twig_escape_filter($this->env, (isset($context["profilesCount"]) || array_key_exists("profilesCount"$context) ? $context["profilesCount"] : (function () { throw new RuntimeError('Variable "profilesCount" does not exist.'17$this->source); })()), "html"nulltrue);
  120.                     echo ")</a></li>
  121.                 ";
  122.                 }
  123.                 $_parent $context['_parent'];
  124.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['district'], $context['_parent'], $context['loop']);
  125.                 $context array_intersect_key($context$_parent) + $_parent;
  126.                 // line 19
  127.                 echo "            </ul>
  128.         ";
  129.             }
  130.             $_parent $context['_parent'];
  131.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['county'], $context['_parent'], $context['loop']);
  132.             $context array_intersect_key($context$_parent) + $_parent;
  133.             // line 21
  134.             echo "    ";
  135.         } else {
  136.             // line 22
  137.             echo "        <ul class=\"list-unstyled\">
  138.             ";
  139.             // line 23
  140.             $context['_parent'] = $context;
  141.             $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["city"]) || array_key_exists("city"$context) ? $context["city"] : (function () { throw new RuntimeError('Variable "city" does not exist.'23$this->source); })()), "districts", [], "any"falsefalsefalse23));
  142.             foreach ($context['_seq'] as $context["_key"] => $context["district"]) {
  143.                 // line 24
  144.                 echo "                ";
  145.                 $context["profilesCount"] = (((twig_get_attribute($this->env$this->source, ($context["count_by_districts"] ?? null), twig_get_attribute($this->env$this->source$context["district"], "id", [], "any"falsefalsefalse24), [], "array"truetruefalse24) &&  !(null === twig_get_attribute($this->env$this->source, ($context["count_by_districts"] ?? null), twig_get_attribute($this->env$this->source$context["district"], "id", [], "any"falsefalsefalse24), [], "array"falsefalsefalse24)))) ? (twig_get_attribute($this->env$this->source, ($context["count_by_districts"] ?? null), twig_get_attribute($this->env$this->source$context["district"], "id", [], "any"falsefalsefalse24), [], "array"falsefalsefalse24)) : (0));
  146.                 // line 25
  147.                 echo "                <li><a href=\"";
  148.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("profile_list.list_by_district", ["city" => twig_get_attribute($this->env$this->source, (isset($context["city"]) || array_key_exists("city"$context) ? $context["city"] : (function () { throw new RuntimeError('Variable "city" does not exist.'25$this->source); })()), "uriIdentity", [], "any"falsefalsefalse25), "district" => twig_get_attribute($this->env$this->source$context["district"], "uriIdentity", [], "any"falsefalsefalse25)]), "html"nulltrue);
  149.                 echo "\">";
  150.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env$this->source$context["district"], "name", [], "any"falsefalsefalse25)), "html"nulltrue);
  151.                 echo " (";
  152.                 echo twig_escape_filter($this->env, (isset($context["profilesCount"]) || array_key_exists("profilesCount"$context) ? $context["profilesCount"] : (function () { throw new RuntimeError('Variable "profilesCount" does not exist.'25$this->source); })()), "html"nulltrue);
  153.                 echo ")</a></li>
  154.             ";
  155.             }
  156.             $_parent $context['_parent'];
  157.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['district'], $context['_parent'], $context['loop']);
  158.             $context array_intersect_key($context$_parent) + $_parent;
  159.             // line 27
  160.             echo "        </ul>
  161.     ";
  162.         }
  163.         
  164.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  165.         
  166.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  167.         
  168.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  169.     }
  170.     /**
  171.      * @codeCoverageIgnore
  172.      */
  173.     public function getTemplateName()
  174.     {
  175.         return "DistrictList/list.html.twig";
  176.     }
  177.     /**
  178.      * @codeCoverageIgnore
  179.      */
  180.     public function isTraitable()
  181.     {
  182.         return false;
  183.     }
  184.     /**
  185.      * @codeCoverageIgnore
  186.      */
  187.     public function getDebugInfo()
  188.     {
  189.         return array (  184 => 27,  171 => 25,  168 => 24,  164 => 23,  161 => 22,  158 => 21,  151 => 19,  138 => 17,  135 => 16,  131 => 15,  121 => 12,  118 => 11,  115 => 10,  110 => 9,  107 => 8,  94 => 7,  78 => 4,  65 => 3,  36 => 1,);
  190.     }
  191.     public function getSourceContext()
  192.     {
  193.         return new Source("{% extends 'grid.html.twig' %}
  194. {% block leftSidebar %}
  195.     {{ knp_menu_render('left_compact_view', {'template': '_menu/left_compact_view.html.twig'}) }}
  196. {% endblock %}
  197. {% block mainContainer %}
  198.     {% if city.counties|length > 0 %}
  199.         {% for county in city.counties %}
  200.             {% set profilesCountInCounty = count_by_counties[county.id] ?? 0 %}
  201.             <h4>
  202.                 <a href=\"{{ path('profile_list.list_by_county', {'city': city.uriIdentity, 'county': county.uriIdentity}) }}\">{{ county.name|trans }} ({{ profilesCountInCounty }})</a>
  203.             </h4>
  204.             <ul class=\"list-unstyled\">
  205.                 {% for district in county.districts %}
  206.                     {% set profilesCount = count_by_districts[district.id] ?? 0 %}
  207.                     <li><a href=\"{{ path('profile_list.list_by_district', {'city': city.uriIdentity, 'district': district.uriIdentity}) }}\">{{ district.name|trans }} ({{ profilesCount }})</a></li>
  208.                 {% endfor %}
  209.             </ul>
  210.         {% endfor %}
  211.     {% else %}
  212.         <ul class=\"list-unstyled\">
  213.             {% for district in city.districts %}
  214.                 {% set profilesCount = count_by_districts[district.id] ?? 0 %}
  215.                 <li><a href=\"{{ path('profile_list.list_by_district', {'city': city.uriIdentity, 'district': district.uriIdentity}) }}\">{{ district.name|trans }} ({{ profilesCount }})</a></li>
  216.             {% endfor %}
  217.         </ul>
  218.     {% endif %}
  219. {% endblock %}
  220. ""DistrictList/list.html.twig""/app/templates/DistrictList/list.html.twig");
  221.     }
  222. }