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

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.             'mainContainer' => [$this'block_mainContainer'],
  24.         ];
  25.     }
  26.     protected function doGetParent(array $context)
  27.     {
  28.         // line 1
  29.         return "grid.html.twig";
  30.     }
  31.     protected function doDisplay(array $context, array $blocks = [])
  32.     {
  33.         $macros $this->macros;
  34.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  35.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""DistrictList/list.html.twig"));
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""DistrictList/list.html.twig"));
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""DistrictList/list.html.twig"));
  40.         // line 3
  41.         $context["linkLangSupport"] = (((twig_get_attribute($this->env$this->sourcetwig_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.'3$this->source); })()), "request", [], "any"falsefalsefalse3), "locale", [], "any"falsefalsefalse3) == "en")) ? ("/en") : (""));
  42.         // line 1
  43.         $this->parent $this->loadTemplate("grid.html.twig""DistrictList/list.html.twig"1);
  44.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  45.         
  46.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  47.         
  48.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  49.         
  50.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  51.     }
  52.     // line 5
  53.     public function block_mainContainer($context, array $blocks = [])
  54.     {
  55.         $macros $this->macros;
  56.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  57.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""mainContainer"));
  58.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  59.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""mainContainer"));
  60.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  61.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""mainContainer"));
  62.         // line 6
  63.         echo "\t";
  64.         echo $this->extensions['Knp\Menu\Twig\MenuExtension']->render("breadcrumbs", ["template" => "__design/v2023/_menu/breadcrumbs.html.twig"]);
  65.         echo "
  66. \t<div class=\"heading d-flex\">
  67. \t\t<h1 class=\"heading-title text-title mr-1\" role=\"heading\">";
  68.         // line 9
  69.         echo (($this->extensions['App\Twig\SeoExtension']->pageHeading()) ? ($this->extensions['App\Twig\SeoExtension']->pageHeading()) : ("Поиск по районам"));
  70.         echo "</h1>
  71. \t</div>
  72. \t<div class=\"catalog-district-container white-block mb-4\">
  73. \t\t";
  74.         // line 13
  75.         $context["currentCounty"] = null;
  76.         // line 14
  77.         echo "\t\t";
  78.         $context["sorted_stations"] = twig_sort_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.'14$this->source); })()), "counties", [], "any"falsefalsefalse14), function ($__a__$__b__) use ($context$macros) { $context["a"] = $__a__$context["b"] = $__b__; return (twig_upper_filter($this->envtwig_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.'14$this->source); })()), "name", [], "any"falsefalsefalse14)) <=> twig_upper_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["b"]) || array_key_exists("b"$context) ? $context["b"] : (function () { throw new RuntimeError('Variable "b" does not exist.'14$this->source); })()), "name", [], "any"falsefalsefalse14))); });
  79.         // line 15
  80.         echo "\t\t";
  81.         $context['_parent'] = $context;
  82.         $context['_seq'] = twig_ensure_traversable((isset($context["sorted_stations"]) || array_key_exists("sorted_stations"$context) ? $context["sorted_stations"] : (function () { throw new RuntimeError('Variable "sorted_stations" does not exist.'15$this->source); })()));
  83.         $context['loop'] = [
  84.           'parent' => $context['_parent'],
  85.           'index0' => 0,
  86.           'index'  => 1,
  87.           'first'  => true,
  88.         ];
  89.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  90.             $length count($context['_seq']);
  91.             $context['loop']['revindex0'] = $length 1;
  92.             $context['loop']['revindex'] = $length;
  93.             $context['loop']['length'] = $length;
  94.             $context['loop']['last'] = === $length;
  95.         }
  96.         foreach ($context['_seq'] as $context["_key"] => $context["county"]) {
  97.             // line 16
  98.             echo "            ";
  99.             $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"falsefalsefalse16), [], "array"truetruefalse16) &&  !(null === twig_get_attribute($this->env$this->source, ($context["count_by_counties"] ?? null), twig_get_attribute($this->env$this->source$context["county"], "id", [], "any"falsefalsefalse16), [], "array"falsefalsefalse16)))) ? (twig_get_attribute($this->env$this->source, ($context["count_by_counties"] ?? null), twig_get_attribute($this->env$this->source$context["county"], "id", [], "any"falsefalsefalse16), [], "array"falsefalsefalse16)) : (0));
  100.             // line 17
  101.             echo "
  102. \t\t\t";
  103.             // line 18
  104.             $context["newCounty"] = twig_get_attribute($this->env$this->source$context["county"], "name", [], "any"falsefalsefalse18);
  105.             // line 19
  106.             echo "\t\t\t";
  107.             if (((isset($context["newCounty"]) || array_key_exists("newCounty"$context) ? $context["newCounty"] : (function () { throw new RuntimeError('Variable "newCounty" does not exist.'19$this->source); })()) != (isset($context["currentCounty"]) || array_key_exists("currentCounty"$context) ? $context["currentCounty"] : (function () { throw new RuntimeError('Variable "currentCounty" does not exist.'19$this->source); })()))) {
  108.                 // line 20
  109.                 echo "\t\t\t\t";
  110.                 if ((twig_get_attribute($this->env$this->source$context["loop"], "index", [], "any"falsefalsefalse20) != 1)) {
  111.                     echo "</div>";
  112.                 }
  113.                 // line 21
  114.                 echo "\t\t\t\t";
  115.                 $context["currentCounty"] = (isset($context["newCounty"]) || array_key_exists("newCounty"$context) ? $context["newCounty"] : (function () { throw new RuntimeError('Variable "newCounty" does not exist.'21$this->source); })());
  116.                 // line 22
  117.                 echo "\t\t\t\t<div class=\"catalog catalog-district mb-4\">
  118. \t\t\t\t\t<a class=\"catalog-title mb-2 fw-700 d-flex-c\" href=\"";
  119.                 // line 23
  120.                 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.'23$this->source); })()), "uriIdentity", [], "any"falsefalsefalse23), "county" => twig_get_attribute($this->env$this->source$context["county"], "uriIdentity", [], "any"falsefalsefalse23)]), "html"nulltrue);
  121.                 echo "\">
  122. \t\t\t\t\t\t";
  123.                 // line 24
  124.                 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"falsefalsefalse24)), "html"nulltrue);
  125.                 echo " <span class=\"metro-count counties-count d-flex-c clr-main-text fw-600\">";
  126.                 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.'24$this->source); })()), "html"nulltrue);
  127.                 echo "</span>
  128. \t\t\t\t\t</a>
  129. \t\t\t";
  130.             }
  131.             // line 27
  132.             echo "
  133. \t\t\t";
  134.             // line 28
  135.             $context['_parent'] = $context;
  136.             $context['_seq'] = twig_ensure_traversable(twig_sort_filter($this->envtwig_get_attribute($this->env$this->source$context["county"], "districts", [], "any"falsefalsefalse28), function ($__a__$__b__) use ($context$macros) { $context["a"] = $__a__$context["b"] = $__b__; return (twig_upper_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(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.'28$this->source); })()), "name", [], "any"falsefalsefalse28))) <=> twig_upper_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env$this->source, (isset($context["b"]) || array_key_exists("b"$context) ? $context["b"] : (function () { throw new RuntimeError('Variable "b" does not exist.'28$this->source); })()), "name", [], "any"falsefalsefalse28)))); }));
  137.             foreach ($context['_seq'] as $context["_key"] => $context["district"]) {
  138.                 // line 29
  139.                 echo "\t\t\t\t";
  140.                 $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"falsefalsefalse29), [], "array"truetruefalse29) &&  !(null === twig_get_attribute($this->env$this->source, ($context["count_by_districts"] ?? null), twig_get_attribute($this->env$this->source$context["district"], "id", [], "any"falsefalsefalse29), [], "array"falsefalsefalse29)))) ? (twig_get_attribute($this->env$this->source, ($context["count_by_districts"] ?? null), twig_get_attribute($this->env$this->source$context["district"], "id", [], "any"falsefalsefalse29), [], "array"falsefalsefalse29)) : (0));
  141.                 // line 30
  142.                 echo "
  143. \t\t\t\t<div class=\"catalog-item\">
  144. \t\t\t\t\t<a class=\"metro-link d-flex-c\" href=\"";
  145.                 // line 32
  146.                 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.'32$this->source); })()), "uriIdentity", [], "any"falsefalsefalse32), "district" => twig_get_attribute($this->env$this->source$context["district"], "uriIdentity", [], "any"falsefalsefalse32)]), "html"nulltrue);
  147.                 echo "\">
  148. \t\t\t\t\t\t<span class=\"metro-name mr-1\">";
  149.                 // line 33
  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"falsefalsefalse33)), "html"nulltrue);
  151.                 echo "</span>
  152. \t\t\t\t\t\t<span class=\"metro-count d-flex-c clr-main-text fw-600\">";
  153.                 // line 34
  154.                 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.'34$this->source); })()), "html"nulltrue);
  155.                 echo "</span>
  156. \t\t\t\t\t</a>
  157. \t\t\t\t</div>
  158. \t\t\t";
  159.             }
  160.             $_parent $context['_parent'];
  161.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['district'], $context['_parent'], $context['loop']);
  162.             $context array_intersect_key($context$_parent) + $_parent;
  163.             // line 38
  164.             echo "
  165. \t\t\t";
  166.             // line 46
  167.             echo "\t\t";
  168.             ++$context['loop']['index0'];
  169.             ++$context['loop']['index'];
  170.             $context['loop']['first'] = false;
  171.             if (isset($context['loop']['length'])) {
  172.                 --$context['loop']['revindex0'];
  173.                 --$context['loop']['revindex'];
  174.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  175.             }
  176.         }
  177.         $_parent $context['_parent'];
  178.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['county'], $context['_parent'], $context['loop']);
  179.         $context array_intersect_key($context$_parent) + $_parent;
  180.         // line 47
  181.         echo "\t</div>
  182. \t";
  183.         
  184.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  185.         
  186.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  187.         
  188.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  189.     }
  190.     /**
  191.      * @codeCoverageIgnore
  192.      */
  193.     public function getTemplateName()
  194.     {
  195.         return "DistrictList/list.html.twig";
  196.     }
  197.     /**
  198.      * @codeCoverageIgnore
  199.      */
  200.     public function isTraitable()
  201.     {
  202.         return false;
  203.     }
  204.     /**
  205.      * @codeCoverageIgnore
  206.      */
  207.     public function getDebugInfo()
  208.     {
  209.         return array (  200 => 47,  186 => 46,  183 => 38,  173 => 34,  169 => 33,  165 => 32,  161 => 30,  158 => 29,  154 => 28,  151 => 27,  143 => 24,  139 => 23,  136 => 22,  133 => 21,  128 => 20,  125 => 19,  123 => 18,  120 => 17,  117 => 16,  99 => 15,  96 => 14,  94 => 13,  87 => 9,  80 => 6,  67 => 5,  53 => 1,  51 => 3,  35 => 1,);
  210.     }
  211.     public function getSourceContext()
  212.     {
  213.         return new Source("{% extends 'grid.html.twig' %}
  214. {% set linkLangSupport = app.request.locale == 'en' ? '/en' : '' %}
  215. {% block mainContainer %}
  216. \t{{ knp_menu_render('breadcrumbs', {'template': '__design/v2023/_menu/breadcrumbs.html.twig'}) }}
  217. \t<div class=\"heading d-flex\">
  218. \t\t<h1 class=\"heading-title text-title mr-1\" role=\"heading\">{{ seo_heading() ? seo_heading() : 'Поиск по районам' }}</h1>
  219. \t</div>
  220. \t<div class=\"catalog-district-container white-block mb-4\">
  221. \t\t{% set currentCounty = null %}
  222. \t\t{% set sorted_stations = city.counties|sort((a, b) => a.name|upper <=> b.name|upper) %}
  223. \t\t{% for county in sorted_stations %}
  224.             {% set profilesCountInCounty = count_by_counties[county.id] ?? 0 %}
  225. \t\t\t{% set newCounty = county.name %}
  226. \t\t\t{% if newCounty != currentCounty %}
  227. \t\t\t\t{% if loop.index != 1 %}</div>{% endif %}
  228. \t\t\t\t{% set currentCounty = newCounty %}
  229. \t\t\t\t<div class=\"catalog catalog-district mb-4\">
  230. \t\t\t\t\t<a class=\"catalog-title mb-2 fw-700 d-flex-c\" href=\"{{ path('profile_list.list_by_county', {'city': city.uriIdentity, 'county': county.uriIdentity}) }}\">
  231. \t\t\t\t\t\t{{ county.name|trans }} <span class=\"metro-count counties-count d-flex-c clr-main-text fw-600\">{{ profilesCountInCounty }}</span>
  232. \t\t\t\t\t</a>
  233. \t\t\t{% endif %}
  234. \t\t\t{% for district in county.districts|sort((a, b) => a.name|trans|upper <=> b.name|trans|upper) %}
  235. \t\t\t\t{% set profilesCount = count_by_districts[district.id] ?? 0 %}
  236. \t\t\t\t<div class=\"catalog-item\">
  237. \t\t\t\t\t<a class=\"metro-link d-flex-c\" href=\"{{ path('profile_list.list_by_district', {'city': city.uriIdentity, 'district': district.uriIdentity}) }}\">
  238. \t\t\t\t\t\t<span class=\"metro-name mr-1\">{{ district.name|trans }}</span>
  239. \t\t\t\t\t\t<span class=\"metro-count d-flex-c clr-main-text fw-600\">{{ profilesCount }}</span>
  240. \t\t\t\t\t</a>
  241. \t\t\t\t</div>
  242. \t\t\t{% endfor %}
  243. \t\t\t{# <div class=\"catalog-item\">
  244. \t\t\t\t<a class=\"metro-link d-flex-c\" href=\"{{ path('profile_list.list_by_station', {'city': city.uriIdentity, 'station': station.uriIdentity}) }}\">
  245. \t\t\t\t\t{% include 'components/metro/icon_generate.partial.twig' with {data: station.id|station_lines} %}
  246. \t\t\t\t\t<span class=\"metro-name mr-1\">{{ station.name|trans }}</span>
  247. \t\t\t\t\t<span class=\"metro-count d-flex-c clr-main-text fw-600\">10</span>
  248. \t\t\t\t</a>
  249. \t\t\t</div> #}
  250. \t\t{% endfor %}
  251. \t</div>
  252. \t{# <div class=\"new-questionare\">
  253. \t\t{{ include('components/last_girl_list.html.twig') }}
  254. \t</div>
  255. \t{{ include('components/seo_text.html.twig', { 'type': 'bottom', \"noindex\": false }) }} #}
  256. {% endblock %}""DistrictList/list.html.twig""/app/templates/DistrictList/list.html.twig");
  257.     }
  258. }