var/cache/dev/twig/97/9711cefcb40fc1e5705a4a9eb4531aee06eb3c4d5ad0aa273b6b4a7831cf3e1f.php line 33

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. /* Slivki/offers/category_list.html.twig */
  14. class __TwigTemplate_76b8f1b9229ddd73691def868ae7517d18e235114a58da3d76b9850e72474864 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""Slivki/offers/category_list.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""Slivki/offers/category_list.html.twig"));
  33.         // line 1
  34.         echo "<div id=\"categories-list\" class=\"";
  35.         echo (((array_key_exists("smallCity"$context) && (isset($context["smallCity"]) || array_key_exists("smallCity"$context) ? $context["smallCity"] : (function () { throw new RuntimeError('Variable "smallCity" does not exist.'1$this->source); })()))) ? (" small-city") : (""));
  36.         echo (((=== twig_compare(twig_length_filter($this->env, (isset($context["topLevelCategoryIDList"]) || array_key_exists("topLevelCategoryIDList"$context) ? $context["topLevelCategoryIDList"] : (function () { throw new RuntimeError('Variable "topLevelCategoryIDList" does not exist.'1$this->source); })())), 1))) ? (" one-category-city") : (""));
  37.         echo "\">
  38.     ";
  39.         // line 2
  40.         $context['_parent'] = $context;
  41.         $context['_seq'] = twig_ensure_traversable((isset($context["categoryBoxList"]) || array_key_exists("categoryBoxList"$context) ? $context["categoryBoxList"] : (function () { throw new RuntimeError('Variable "categoryBoxList" does not exist.'2$this->source); })()));
  42.         foreach ($context['_seq'] as $context["categoryID"] => $context["categoryBox"]) {
  43.             // line 3
  44.             echo "        ";
  45.             $context["categoryBanner"] = (((twig_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); })()), "user", [], "any"falsefalsefalse3) && 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); })()), "user", [], "any"falsefalsefalse3), "hasRole", [=> twig_constant("\\Slivki\\Entity\\UserGroup::ROLE_ADS_FREE")], "method"falsefalsefalse3))) ? ("") : ($this->extensions['Slivki\Twig\SlivkiTwigExtension']->getCategoryBanner(            // line 4
  46. $context["categoryID"])));
  47.             // line 5
  48.             echo "        ";
  49.             $context["categoryBox"] = twig_replace_filter($context["categoryBox"], ["<div id=\"category-banner-placeholder\" style=\"display:none\"></div>" => (isset($context["categoryBanner"]) || array_key_exists("categoryBanner"$context) ? $context["categoryBanner"] : (function () { throw new RuntimeError('Variable "categoryBanner" does not exist.'5$this->source); })())]);
  50.             // line 6
  51.             echo "        ";
  52.             echo $context["categoryBox"];
  53.             echo "
  54.     ";
  55.         }
  56.         $_parent $context['_parent'];
  57.         unset($context['_seq'], $context['_iterated'], $context['categoryID'], $context['categoryBox'], $context['_parent'], $context['loop']);
  58.         $context array_intersect_key($context$_parent) + $_parent;
  59.         // line 8
  60.         echo "</div>
  61. <div id=\"mainPagePromoTextPush\"></div>
  62. ";
  63.         // line 10
  64.         if ($this->extensions['Slivki\Twig\SlivkiTwigExtension']->isMobileDevice()) {
  65.             // line 11
  66.             echo "    ";
  67.             $this->loadTemplate("Slivki/mobile_link_block.html.twig""Slivki/offers/category_list.html.twig"11)->display($context);
  68.         }
  69.         
  70.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  71.         
  72.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  73.     }
  74.     public function getTemplateName()
  75.     {
  76.         return "Slivki/offers/category_list.html.twig";
  77.     }
  78.     public function isTraitable()
  79.     {
  80.         return false;
  81.     }
  82.     public function getDebugInfo()
  83.     {
  84.         return array (  75 => 11,  73 => 10,  69 => 8,  60 => 6,  57 => 5,  55 => 4,  53 => 3,  49 => 2,  43 => 1,);
  85.     }
  86.     public function getSourceContext()
  87.     {
  88.         return new Source("<div id=\"categories-list\" class=\"{{ smallCity is defined and smallCity ? ' small-city' }}{{ topLevelCategoryIDList|length == 1 ? ' one-category-city' }}\">
  89.     {% for categoryID, categoryBox in categoryBoxList %}
  90.         {% set categoryBanner = app.user and app.user.hasRole(constant('\\\\Slivki\\\\Entity\\\\UserGroup::ROLE_ADS_FREE')) ? ''
  91.             : getCategoryBanner(categoryID) %}
  92.         {% set categoryBox =  categoryBox|replace({'<div id=\"category-banner-placeholder\" style=\"display:none\"></div>': categoryBanner}) %}
  93.         {{ categoryBox|raw }}
  94.     {% endfor %}
  95. </div>
  96. <div id=\"mainPagePromoTextPush\"></div>
  97. {% if isMobileDevice() %}
  98.     {% include 'Slivki/mobile_link_block.html.twig' %}
  99. {% endif %}""Slivki/offers/category_list.html.twig""/mnt/data/virtwww/vlad-slivki/templates/Slivki/offers/category_list.html.twig");
  100.     }
  101. }