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.             // line 4
  46.             echo "        ";
  47.             if ((=== twig_compare($context["categoryID"], twig_constant("Slivki\\Entity\\Category::TOP_CATEGORY_ID")))) {
  48.                 // line 5
  49.                 echo "            ";
  50.                 $context["abValue"] = 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.'5$this->source); })()), "session", [], "any"falsefalsefalse5), "get", [=> "rodenTeaserBannerABTest"=> "0"], "method"falsefalsefalse5);
  51.                 // line 6
  52.                 echo "            ";
  53.                 $context["utmCampaign"] = "utm_campaign=abw-woman";
  54.                 // line 7
  55.                 echo "            ";
  56.                 $context["imgUri"] = "/roden-lady.jpg";
  57.                 // line 8
  58.                 echo "            ";
  59.                 if ((=== twig_compare((isset($context["abValue"]) || array_key_exists("abValue"$context) ? $context["abValue"] : (function () { throw new RuntimeError('Variable "abValue" does not exist.'8$this->source); })()), 0))) {
  60.                     // line 9
  61.                     echo "                ";
  62.                     $context["utmCampaign"] = "utm_campaign=abw-vip";
  63.                     // line 10
  64.                     echo "                ";
  65.                     $context["imgUri"] = "/roden-vip.jpg";
  66.                     // line 11
  67.                     echo "                ";
  68.                     echo twig_escape_filter($this->envtwig_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.'11$this->source); })()), "session", [], "any"falsefalsefalse11), "set", [=> "rodenTeaserBannerABTest"=> 1], "method"falsefalsefalse11), "html"nulltrue);
  69.                     echo "
  70.             ";
  71.                 } else {
  72.                     // line 13
  73.                     echo "                ";
  74.                     echo twig_escape_filter($this->envtwig_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.'13$this->source); })()), "session", [], "any"falsefalsefalse13), "set", [=> "rodenTeaserBannerABTest"=> 0], "method"falsefalsefalse13), "html"nulltrue);
  75.                     echo "
  76.             ";
  77.                 }
  78.                 // line 15
  79.                 echo "            ";
  80.                 $context["categoryBox"] = twig_replace_filter($context["categoryBox"], ["utm_campaign=roden_pop" => (isset($context["utmCampaign"]) || array_key_exists("utmCampaign"$context) ? $context["utmCampaign"] : (function () { throw new RuntimeError('Variable "utmCampaign" does not exist.'15$this->source); })()), "/slivki-img/1496324948_.jpg" => (isset($context["imgUri"]) || array_key_exists("imgUri"$context) ? $context["imgUri"] : (function () { throw new RuntimeError('Variable "imgUri" does not exist.'15$this->source); })())]);
  81.                 // line 16
  82.                 echo "            ";
  83.                 $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.'16$this->source); })()), "user", [], "any"falsefalsefalse16) && 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.'16$this->source); })()), "user", [], "any"falsefalsefalse16), "hasRole", [=> twig_constant("\\Slivki\\Entity\\UserGroup::ROLE_ADS_FREE")], "method"falsefalsefalse16))) ? ("") : ($this->extensions['Slivki\Twig\SlivkiTwigExtension']->getCategoryBanner(                // line 17
  84. $context["categoryID"])));
  85.                 // line 18
  86.                 echo "            ";
  87.                 $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.'18$this->source); })())]);
  88.                 // line 19
  89.                 echo "        ";
  90.             }
  91.             // line 20
  92.             echo "        ";
  93.             // line 21
  94.             echo "        ";
  95.             echo $context["categoryBox"];
  96.             echo "
  97.     ";
  98.         }
  99.         $_parent $context['_parent'];
  100.         unset($context['_seq'], $context['_iterated'], $context['categoryID'], $context['categoryBox'], $context['_parent'], $context['loop']);
  101.         $context array_intersect_key($context$_parent) + $_parent;
  102.         // line 23
  103.         echo "</div>
  104. <div id=\"mainPagePromoTextPush\"></div>
  105. ";
  106.         // line 25
  107.         if ($this->extensions['Slivki\Twig\SlivkiTwigExtension']->isMobileDevice()) {
  108.             // line 26
  109.             echo "    ";
  110.             $this->loadTemplate("Slivki/mobile_link_block.html.twig""Slivki/offers/category_list.html.twig"26)->display($context);
  111.         }
  112.         
  113.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  114.         
  115.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  116.     }
  117.     public function getTemplateName()
  118.     {
  119.         return "Slivki/offers/category_list.html.twig";
  120.     }
  121.     public function isTraitable()
  122.     {
  123.         return false;
  124.     }
  125.     public function getDebugInfo()
  126.     {
  127.         return array (  118 => 26,  116 => 25,  112 => 23,  103 => 21,  101 => 20,  98 => 19,  95 => 18,  93 => 17,  91 => 16,  88 => 15,  82 => 13,  76 => 11,  73 => 10,  70 => 9,  67 => 8,  64 => 7,  61 => 6,  58 => 5,  55 => 4,  53 => 3,  49 => 2,  43 => 1,);
  128.     }
  129.     public function getSourceContext()
  130.     {
  131.         return new Source("<div id=\"categories-list\" class=\"{{ smallCity is defined and smallCity ? ' small-city' }}{{ topLevelCategoryIDList|length == 1 ? ' one-category-city' }}\">
  132.     {% for categoryID, categoryBox in categoryBoxList %}
  133.         {# rodenTeaserBannerABTest #}
  134.         {% if categoryID == constant('Slivki\\\\Entity\\\\Category::TOP_CATEGORY_ID') %}
  135.             {% set abValue = app.session.get('rodenTeaserBannerABTest', '0') %}
  136.             {% set utmCampaign = 'utm_campaign=abw-woman' %}
  137.             {% set imgUri = '/roden-lady.jpg' %}
  138.             {% if abValue == 0 %}
  139.                 {% set utmCampaign = 'utm_campaign=abw-vip' %}
  140.                 {% set imgUri = '/roden-vip.jpg' %}
  141.                 {{ app.session.set('rodenTeaserBannerABTest', 1) }}
  142.             {% else %}
  143.                 {{ app.session.set('rodenTeaserBannerABTest', 0) }}
  144.             {% endif %}
  145.             {% set categoryBox = categoryBox|replace({'utm_campaign=roden_pop': utmCampaign, '/slivki-img/1496324948_.jpg': imgUri}) %}
  146.             {% set categoryBanner = app.user and app.user.hasRole(constant('\\\\Slivki\\\\Entity\\\\UserGroup::ROLE_ADS_FREE')) ? ''
  147.                 : getCategoryBanner(categoryID) %}
  148.             {% set categoryBox =  categoryBox|replace({'<div id=\"category-banner-placeholder\" style=\"display:none\"></div>': categoryBanner}) %}
  149.         {% endif %}
  150.         {# end rodenTeaserBannerABTest #}
  151.         {{ categoryBox|raw }}
  152.     {% endfor %}
  153. </div>
  154. <div id=\"mainPagePromoTextPush\"></div>
  155. {% if isMobileDevice() %}
  156.     {% include 'Slivki/mobile_link_block.html.twig' %}
  157. {% endif %}""Slivki/offers/category_list.html.twig""/mnt/data/virtwww/vlad-slivki/templates/Slivki/offers/category_list.html.twig");
  158.     }
  159. }