var/cache/dev/twig/e3/e32e46e9cf34c4689af5f3e8601922355367fa799ae1b9940cf45d56eb43ec36.php line 103

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. /* city/list.html.twig */
  15. class __TwigTemplate_8ad34992ba5693d102c2eb174b0a0df9921761b3caff526c7e622538756c8f07 extends Template
  16. {
  17.     private $source;
  18.     private $macros = [];
  19.     public function __construct(Environment $env)
  20.     {
  21.         parent::__construct($env);
  22.         $this->source $this->getSourceContext();
  23.         $this->blocks = [
  24.             'stylesheets' => [$this'block_stylesheets'],
  25.             'content' => [$this'block_content'],
  26.         ];
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 7
  31.         return "base.html.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""city/list.html.twig"));
  38.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""city/list.html.twig"));
  40.         // line 1
  41.         $context["body_classes"] = ["list-of-cities"];
  42.         // line 2
  43.         $context["suffix"] = (((=== CoreExtension::compare((isset($context["currentPage"]) || array_key_exists("currentPage"$context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.'2$this->source); })()), 1))) ? ("") : ("_with_page"));
  44.         // line 3
  45.         $context["title"] = $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans((("city_list" . (isset($context["suffix"]) || array_key_exists("suffix"$context) ? $context["suffix"] : (function () { throw new RuntimeError('Variable "suffix" does not exist.'3$this->source); })())) . ".title"), ["%page%" => (isset($context["currentPage"]) || array_key_exists("currentPage"$context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.'3$this->source); })())]);
  46.         // line 4
  47.         $context["description"] = $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans((("city_list" . (isset($context["suffix"]) || array_key_exists("suffix"$context) ? $context["suffix"] : (function () { throw new RuntimeError('Variable "suffix" does not exist.'4$this->source); })())) . ".description"), ["%page%" => (isset($context["currentPage"]) || array_key_exists("currentPage"$context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.'4$this->source); })())]);
  48.         // line 5
  49.         $context["keywords"] = $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans((("city_list" . (isset($context["suffix"]) || array_key_exists("suffix"$context) ? $context["suffix"] : (function () { throw new RuntimeError('Variable "suffix" does not exist.'5$this->source); })())) . ".keywords"), ["%page%" => (isset($context["currentPage"]) || array_key_exists("currentPage"$context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.'5$this->source); })())]);
  50.         // line 7
  51.         $this->parent $this->loadTemplate("base.html.twig""city/list.html.twig"7);
  52.         yield from $this->parent->unwrap()->yield($contextarray_merge($this->blocks$blocks));
  53.         
  54.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  55.         
  56.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  57.     }
  58.     // line 9
  59.     public function block_stylesheets($context, array $blocks = [])
  60.     {
  61.         $macros $this->macros;
  62.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  63.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  64.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  65.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  66.         // line 10
  67.         yield "    ";
  68.         yield from $this->yieldParentBlock("stylesheets"$context$blocks);
  69.         yield "
  70.     ";
  71.         // line 11
  72.         yield $this->extensions['Symfony\WebpackEncoreBundle\Twig\EntryFilesTwigExtension']->renderWebpackLinkTags("city_list");
  73.         yield "
  74.     ";
  75.         // line 12
  76.         yield $this->extensions['Symfony\WebpackEncoreBundle\Twig\EntryFilesTwigExtension']->renderWebpackLinkTags("search_autocomplete");
  77.         yield "
  78. ";
  79.         
  80.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  81.         
  82.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  83.         return; yield '';
  84.     }
  85.     // line 15
  86.     public function block_content($context, array $blocks = [])
  87.     {
  88.         $macros $this->macros;
  89.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  90.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  91.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  92.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  93.         // line 16
  94.         yield "    <main>
  95.         <div class=\"container\">
  96.             <div class=\"list-of-cities-container\">
  97.                 <div class=\"search-form-wrapper animate-on-scroll-bottom\">
  98.                     <div class=\"title\">
  99.                         <h3>";
  100.         // line 21
  101.         yield $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("cities.list_title");
  102.         yield "</h3>
  103.                     </div>
  104.                     ";
  105.         // line 23
  106.         yield         $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'23$this->source); })()), 'form_start', ["attr" => ["data-controller" => "search""data-search-url-value" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("search_cities_with_profiles"), "data-action" => "submit->search#onSubmit"]]);
  107.         // line 27
  108.         yield "
  109.                         <div class=\"field-wrapper\">
  110.                             ";
  111.         // line 29
  112.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'29$this->source); })()), "search", [], "any"falsefalsefalse29), 'widget', ["attr" => ["data-action" => "input->search#onAutocomplete click->search#onClick""data-search-target" => "input"]]);
  113.         // line 32
  114.         yield "
  115.                             <div class=\"autocomplete-results\" ";
  116.         // line 33
  117.         yield $this->extensions['Symfony\WebpackEncoreBundle\Twig\StimulusTwigExtension']->renderStimulusTarget($this->env"search""results");
  118.         yield "></div>
  119.                         </div>
  120.                         <div class=\"buttons-container\">
  121.                             ";
  122.         // line 36
  123.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'36$this->source); })()), "submit", [], "any"falsefalsefalse36), 'widget');
  124.         yield "
  125.                         </div>
  126.                     ";
  127.         // line 38
  128.         yield         $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'38$this->source); })()), 'form_end');
  129.         yield "
  130.                 </div>
  131.                 <div class=\"list-wrapper\">
  132.                     ";
  133.         // line 41
  134.         $context['_parent'] = $context;
  135.         $context['_seq'] = CoreExtension::ensureTraversable((isset($context["cities"]) || array_key_exists("cities"$context) ? $context["cities"] : (function () { throw new RuntimeError('Variable "cities" does not exist.'41$this->source); })()));
  136.         foreach ($context['_seq'] as $context["_key"] => $context["city"]) {
  137.             // line 42
  138.             yield "                        <a href=\"";
  139.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("city_companies_list", ["id" => CoreExtension::getAttribute($this->env$this->source$context["city"], "id", [], "any"falsefalsefalse42), "slug" => CoreExtension::getAttribute($this->env$this->source$context["city"], "slug", [], "any"falsefalsefalse42)]), "html"nulltrue);
  140.             yield "\" class=\"city\">
  141.                             ";
  142.             // line 43
  143.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["city"], "name", [], "any"falsefalsefalse43), "html"nulltrue);
  144.             yield "
  145.                         </a>
  146.                     ";
  147.         }
  148.         $_parent $context['_parent'];
  149.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['city'], $context['_parent'], $context['loop']);
  150.         $context array_intersect_key($context$_parent) + $_parent;
  151.         // line 46
  152.         yield "                </div>
  153.                 ";
  154.         // line 47
  155.         if ((=== CoreExtension::compare(Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["pagination"]) || array_key_exists("pagination"$context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.'47$this->source); })())), 1))) {
  156.             // line 48
  157.             yield "                    <div class=\"toolbar-bottom-container\">
  158.                         <nav class=\"pagination-container\">
  159.                             ";
  160.             // line 50
  161.             if ((=== CoreExtension::compare((isset($context["currentPage"]) || array_key_exists("currentPage"$context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.'50$this->source); })()), 1))) {
  162.                 // line 51
  163.                 yield "                                <a href=\"";
  164.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("city_list", ["page" => ((isset($context["currentPage"]) || array_key_exists("currentPage"$context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.'51$this->source); })()) - 1)]), "html"nulltrue);
  165.                 yield "\" class=\"p-i-previous\"></a>
  166.                             ";
  167.             } else {
  168.                 // line 53
  169.                 yield "                                <span class=\"p-i-previous p-i-disabled\"></span>
  170.                             ";
  171.             }
  172.             // line 55
  173.             yield "                            <span class=\"pagination-pages\">
  174.                                 ";
  175.             // line 56
  176.             $context['_parent'] = $context;
  177.             $context['_seq'] = CoreExtension::ensureTraversable((isset($context["pagination"]) || array_key_exists("pagination"$context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.'56$this->source); })()));
  178.             foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
  179.                 // line 57
  180.                 yield "                                    ";
  181.                 if ((=== CoreExtension::compare($context["p"], (isset($context["currentPage"]) || array_key_exists("currentPage"$context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.'57$this->source); })())))) {
  182.                     // line 58
  183.                     yield "                                        <span class=\"pagination-item p-i p-i-disabled\">";
  184.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["p"], "html"nulltrue);
  185.                     yield "</span>
  186.                                     ";
  187.                 } elseif ((=== CoreExtension::compare(                // line 59
  188. $context["p"], "..."))) {
  189.                     // line 60
  190.                     yield "                                        <span class=\"pagination-item p-i\">…</span>
  191.                                     ";
  192.                 } else {
  193.                     // line 62
  194.                     yield "                                        <a href=\"";
  195.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("city_list", ["page" => $context["p"]]), "html"nulltrue);
  196.                     yield "\" class=\"pagination-item p-i\">
  197.                                             ";
  198.                     // line 63
  199.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["p"], "html"nulltrue);
  200.                     yield "
  201.                                         </a>
  202.                                     ";
  203.                 }
  204.                 // line 66
  205.                 yield "                                ";
  206.             }
  207.             $_parent $context['_parent'];
  208.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['p'], $context['_parent'], $context['loop']);
  209.             $context array_intersect_key($context$_parent) + $_parent;
  210.             // line 67
  211.             yield "                            </span>
  212.                             ";
  213.             // line 68
  214.             if ((-=== CoreExtension::compare((isset($context["currentPage"]) || array_key_exists("currentPage"$context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.'68$this->source); })()), Twig\Extension\CoreExtension::last($this->env->getCharset(), (isset($context["pagination"]) || array_key_exists("pagination"$context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.'68$this->source); })()))))) {
  215.                 // line 69
  216.                 yield "                                <a href=\"";
  217.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("city_list", ["page" => ((isset($context["currentPage"]) || array_key_exists("currentPage"$context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.'69$this->source); })()) + 1)]), "html"nulltrue);
  218.                 yield "\" class=\"p-i-next\"></a>
  219.                             ";
  220.             } else {
  221.                 // line 71
  222.                 yield "                                <span class=\"p-i-next p-i-disabled\"></span>
  223.                             ";
  224.             }
  225.             // line 73
  226.             yield "                        </nav>
  227.                     </div>
  228.                 ";
  229.         }
  230.         // line 76
  231.         yield "            </div>
  232.         </div>
  233.     </main>
  234. ";
  235.         
  236.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  237.         
  238.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  239.         return; yield '';
  240.     }
  241.     /**
  242.      * @codeCoverageIgnore
  243.      */
  244.     public function getTemplateName()
  245.     {
  246.         return "city/list.html.twig";
  247.     }
  248.     /**
  249.      * @codeCoverageIgnore
  250.      */
  251.     public function isTraitable()
  252.     {
  253.         return false;
  254.     }
  255.     /**
  256.      * @codeCoverageIgnore
  257.      */
  258.     public function getDebugInfo()
  259.     {
  260.         return array (  250 => 76,  245 => 73,  241 => 71,  235 => 69,  233 => 68,  230 => 67,  224 => 66,  218 => 63,  213 => 62,  209 => 60,  207 => 59,  202 => 58,  199 => 57,  195 => 56,  192 => 55,  188 => 53,  182 => 51,  180 => 50,  176 => 48,  174 => 47,  171 => 46,  162 => 43,  157 => 42,  153 => 41,  147 => 38,  142 => 36,  136 => 33,  133 => 32,  131 => 29,  127 => 27,  125 => 23,  120 => 21,  113 => 16,  103 => 15,  90 => 12,  86 => 11,  81 => 10,  71 => 9,  60 => 7,  58 => 5,  56 => 4,  54 => 3,  52 => 2,  50 => 1,  37 => 7,);
  261.     }
  262.     public function getSourceContext()
  263.     {
  264.         return new Source("{% set body_classes = ['list-of-cities'] %}
  265. {% set suffix = currentPage == 1 ? '' : '_with_page' %}
  266. {% set title = ('city_list' ~ suffix ~ '.title')|trans({'%page%': currentPage}) %}
  267. {% set description = ('city_list' ~ suffix ~ '.description')|trans({'%page%': currentPage}) %}
  268. {% set keywords = ('city_list' ~ suffix ~ '.keywords')|trans({'%page%': currentPage}) %}
  269. {% extends 'base.html.twig' %}
  270. {% block stylesheets %}
  271.     {{ parent() }}
  272.     {{ encore_entry_link_tags('city_list') }}
  273.     {{ encore_entry_link_tags('search_autocomplete') }}
  274. {% endblock stylesheets %}
  275. {% block content %}
  276.     <main>
  277.         <div class=\"container\">
  278.             <div class=\"list-of-cities-container\">
  279.                 <div class=\"search-form-wrapper animate-on-scroll-bottom\">
  280.                     <div class=\"title\">
  281.                         <h3>{{ 'cities.list_title'|trans|raw }}</h3>
  282.                     </div>
  283.                     {{ form_start(form, {'attr': {
  284.                         'data-controller': 'search',
  285.                         'data-search-url-value': path('search_cities_with_profiles'),
  286.                         'data-action': 'submit->search#onSubmit',
  287.                     }}) }}
  288.                         <div class=\"field-wrapper\">
  289.                             {{ form_widget(form.search, {'attr': {
  290.                                 'data-action': 'input->search#onAutocomplete click->search#onClick',
  291.                                 'data-search-target': 'input',
  292.                             }}) }}
  293.                             <div class=\"autocomplete-results\" {{ stimulus_target('search', 'results') }}></div>
  294.                         </div>
  295.                         <div class=\"buttons-container\">
  296.                             {{ form_widget(form.submit) }}
  297.                         </div>
  298.                     {{ form_end(form) }}
  299.                 </div>
  300.                 <div class=\"list-wrapper\">
  301.                     {% for city in cities %}
  302.                         <a href=\"{{ path('city_companies_list', {'id': city.id, 'slug': city.slug}) }}\" class=\"city\">
  303.                             {{ city.name }}
  304.                         </a>
  305.                     {% endfor %}
  306.                 </div>
  307.                 {% if pagination|length > 1 %}
  308.                     <div class=\"toolbar-bottom-container\">
  309.                         <nav class=\"pagination-container\">
  310.                             {% if currentPage > 1 %}
  311.                                 <a href=\"{{ path('city_list', { page: currentPage - 1 }) }}\" class=\"p-i-previous\"></a>
  312.                             {% else %}
  313.                                 <span class=\"p-i-previous p-i-disabled\"></span>
  314.                             {% endif %}
  315.                             <span class=\"pagination-pages\">
  316.                                 {% for p in pagination %}
  317.                                     {% if p == currentPage %}
  318.                                         <span class=\"pagination-item p-i p-i-disabled\">{{ p }}</span>
  319.                                     {% elseif p == '...' %}
  320.                                         <span class=\"pagination-item p-i\">…</span>
  321.                                     {% else %}
  322.                                         <a href=\"{{ path('city_list', { page: p }) }}\" class=\"pagination-item p-i\">
  323.                                             {{ p }}
  324.                                         </a>
  325.                                     {% endif %}
  326.                                 {% endfor %}
  327.                             </span>
  328.                             {% if currentPage < pagination|last %}
  329.                                 <a href=\"{{ path('city_list', { page: currentPage + 1 }) }}\" class=\"p-i-next\"></a>
  330.                             {% else %}
  331.                                 <span class=\"p-i-next p-i-disabled\"></span>
  332.                             {% endif %}
  333.                         </nav>
  334.                     </div>
  335.                 {% endif %}
  336.             </div>
  337.         </div>
  338.     </main>
  339. {% endblock content %}""city/list.html.twig""/var/www/brc_frontend/templates/city/list.html.twig");
  340.     }
  341. }