<?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;
/* DistrictList/list.html.twig */
class __TwigTemplate_fcce3a5daf672543daddd497c6f8447f extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'leftSidebar' => [$this, 'block_leftSidebar'],
'mainContainer' => [$this, 'block_mainContainer'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "grid.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_b91a4435ea3baf1e2b6bfda56133dace = $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
$__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "DistrictList/list.html.twig"));
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "DistrictList/list.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "DistrictList/list.html.twig"));
$this->parent = $this->loadTemplate("grid.html.twig", "DistrictList/list.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
public function block_leftSidebar($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_b91a4435ea3baf1e2b6bfda56133dace = $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
$__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "leftSidebar"));
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "leftSidebar"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "leftSidebar"));
// line 4
echo " ";
echo $this->extensions['Knp\Menu\Twig\MenuExtension']->render("left_compact_view", ["template" => "_menu/left_compact_view.html.twig"]);
echo "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
}
// line 7
public function block_mainContainer($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_b91a4435ea3baf1e2b6bfda56133dace = $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
$__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "mainContainer"));
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "mainContainer"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "mainContainer"));
// line 8
echo " ";
if ((twig_length_filter($this->env, 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.', 8, $this->source); })()), "counties", [], "any", false, false, false, 8)) > 0)) {
// line 9
echo " ";
$context['_parent'] = $context;
$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", false, false, false, 9));
foreach ($context['_seq'] as $context["_key"] => $context["county"]) {
// line 10
echo " ";
$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", false, false, false, 10), [], "array", true, true, false, 10) && !(null === twig_get_attribute($this->env, $this->source, ($context["count_by_counties"] ?? null), twig_get_attribute($this->env, $this->source, $context["county"], "id", [], "any", false, false, false, 10), [], "array", false, false, false, 10)))) ? (twig_get_attribute($this->env, $this->source, ($context["count_by_counties"] ?? null), twig_get_attribute($this->env, $this->source, $context["county"], "id", [], "any", false, false, false, 10), [], "array", false, false, false, 10)) : (0));
// line 11
echo " <h4>
<a href=\"";
// line 12
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", false, false, false, 12), "county" => twig_get_attribute($this->env, $this->source, $context["county"], "uriIdentity", [], "any", false, false, false, 12)]), "html", null, true);
echo "\">";
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", false, false, false, 12)), "html", null, true);
echo " (";
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", null, true);
echo ")</a>
</h4>
<ul class=\"list-unstyled\">
";
// line 15
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["county"], "districts", [], "any", false, false, false, 15));
foreach ($context['_seq'] as $context["_key"] => $context["district"]) {
// line 16
echo " ";
$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", false, false, false, 16), [], "array", true, true, false, 16) && !(null === twig_get_attribute($this->env, $this->source, ($context["count_by_districts"] ?? null), twig_get_attribute($this->env, $this->source, $context["district"], "id", [], "any", false, false, false, 16), [], "array", false, false, false, 16)))) ? (twig_get_attribute($this->env, $this->source, ($context["count_by_districts"] ?? null), twig_get_attribute($this->env, $this->source, $context["district"], "id", [], "any", false, false, false, 16), [], "array", false, false, false, 16)) : (0));
// line 17
echo " <li><a href=\"";
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", false, false, false, 17), "district" => twig_get_attribute($this->env, $this->source, $context["district"], "uriIdentity", [], "any", false, false, false, 17)]), "html", null, true);
echo "\">";
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", false, false, false, 17)), "html", null, true);
echo " (";
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", null, true);
echo ")</a></li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['district'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 19
echo " </ul>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['county'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 21
echo " ";
} else {
// line 22
echo " <ul class=\"list-unstyled\">
";
// line 23
$context['_parent'] = $context;
$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", false, false, false, 23));
foreach ($context['_seq'] as $context["_key"] => $context["district"]) {
// line 24
echo " ";
$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", false, false, false, 24), [], "array", true, true, false, 24) && !(null === twig_get_attribute($this->env, $this->source, ($context["count_by_districts"] ?? null), twig_get_attribute($this->env, $this->source, $context["district"], "id", [], "any", false, false, false, 24), [], "array", false, false, false, 24)))) ? (twig_get_attribute($this->env, $this->source, ($context["count_by_districts"] ?? null), twig_get_attribute($this->env, $this->source, $context["district"], "id", [], "any", false, false, false, 24), [], "array", false, false, false, 24)) : (0));
// line 25
echo " <li><a href=\"";
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", false, false, false, 25), "district" => twig_get_attribute($this->env, $this->source, $context["district"], "uriIdentity", [], "any", false, false, false, 25)]), "html", null, true);
echo "\">";
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", false, false, false, 25)), "html", null, true);
echo " (";
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", null, true);
echo ")</a></li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['district'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 27
echo " </ul>
";
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "DistrictList/list.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{% extends 'grid.html.twig' %}
{% block leftSidebar %}
{{ knp_menu_render('left_compact_view', {'template': '_menu/left_compact_view.html.twig'}) }}
{% endblock %}
{% block mainContainer %}
{% if city.counties|length > 0 %}
{% for county in city.counties %}
{% set profilesCountInCounty = count_by_counties[county.id] ?? 0 %}
<h4>
<a href=\"{{ path('profile_list.list_by_county', {'city': city.uriIdentity, 'county': county.uriIdentity}) }}\">{{ county.name|trans }} ({{ profilesCountInCounty }})</a>
</h4>
<ul class=\"list-unstyled\">
{% for district in county.districts %}
{% set profilesCount = count_by_districts[district.id] ?? 0 %}
<li><a href=\"{{ path('profile_list.list_by_district', {'city': city.uriIdentity, 'district': district.uriIdentity}) }}\">{{ district.name|trans }} ({{ profilesCount }})</a></li>
{% endfor %}
</ul>
{% endfor %}
{% else %}
<ul class=\"list-unstyled\">
{% for district in city.districts %}
{% set profilesCount = count_by_districts[district.id] ?? 0 %}
<li><a href=\"{{ path('profile_list.list_by_district', {'city': city.uriIdentity, 'district': district.uriIdentity}) }}\">{{ district.name|trans }} ({{ profilesCount }})</a></li>
{% endfor %}
</ul>
{% endif %}
{% endblock %}
", "DistrictList/list.html.twig", "/app/templates/DistrictList/list.html.twig");
}
}