<?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;
/* Slivki/offers/category_list.html.twig */
class __TwigTemplate_76b8f1b9229ddd73691def868ae7517d18e235114a58da3d76b9850e72474864 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Slivki/offers/category_list.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Slivki/offers/category_list.html.twig"));
// line 1
echo "<div id=\"categories-list\" class=\"";
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") : (""));
echo (((0 === 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") : (""));
echo "\">
";
// line 2
$context['_parent'] = $context;
$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); })()));
foreach ($context['_seq'] as $context["categoryID"] => $context["categoryBox"]) {
// line 3
echo " ";
// line 4
echo " ";
if ((0 === twig_compare($context["categoryID"], twig_constant("Slivki\\Entity\\Category::TOP_CATEGORY_ID")))) {
// line 5
echo " ";
$context["abValue"] = twig_get_attribute($this->env, $this->source, 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.', 5, $this->source); })()), "session", [], "any", false, false, false, 5), "get", [0 => "rodenTeaserBannerABTest", 1 => "0"], "method", false, false, false, 5);
// line 6
echo " ";
$context["utmCampaign"] = "utm_campaign=abw-woman";
// line 7
echo " ";
$context["imgUri"] = "/roden-lady.jpg";
// line 8
echo " ";
if ((0 === 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))) {
// line 9
echo " ";
$context["utmCampaign"] = "utm_campaign=abw-vip";
// line 10
echo " ";
$context["imgUri"] = "/roden-vip.jpg";
// line 11
echo " ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, 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.', 11, $this->source); })()), "session", [], "any", false, false, false, 11), "set", [0 => "rodenTeaserBannerABTest", 1 => 1], "method", false, false, false, 11), "html", null, true);
echo "
";
} else {
// line 13
echo " ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, 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.', 13, $this->source); })()), "session", [], "any", false, false, false, 13), "set", [0 => "rodenTeaserBannerABTest", 1 => 0], "method", false, false, false, 13), "html", null, true);
echo "
";
}
// line 15
echo " ";
$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); })())]);
// line 16
echo " ";
$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", false, false, false, 16) && twig_get_attribute($this->env, $this->source, 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", false, false, false, 16), "hasRole", [0 => twig_constant("\\Slivki\\Entity\\UserGroup::ROLE_ADS_FREE")], "method", false, false, false, 16))) ? ("") : ($this->extensions['Slivki\Twig\SlivkiTwigExtension']->getCategoryBanner( // line 17
$context["categoryID"])));
// line 18
echo " ";
$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); })())]);
// line 19
echo " ";
}
// line 20
echo " ";
// line 21
echo " ";
echo $context["categoryBox"];
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['categoryID'], $context['categoryBox'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 23
echo "</div>
<div id=\"mainPagePromoTextPush\"></div>
";
// line 25
if ($this->extensions['Slivki\Twig\SlivkiTwigExtension']->isMobileDevice()) {
// line 26
echo " ";
$this->loadTemplate("Slivki/mobile_link_block.html.twig", "Slivki/offers/category_list.html.twig", 26)->display($context);
}
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "Slivki/offers/category_list.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("<div id=\"categories-list\" class=\"{{ smallCity is defined and smallCity ? ' small-city' }}{{ topLevelCategoryIDList|length == 1 ? ' one-category-city' }}\">
{% for categoryID, categoryBox in categoryBoxList %}
{# rodenTeaserBannerABTest #}
{% if categoryID == constant('Slivki\\\\Entity\\\\Category::TOP_CATEGORY_ID') %}
{% set abValue = app.session.get('rodenTeaserBannerABTest', '0') %}
{% set utmCampaign = 'utm_campaign=abw-woman' %}
{% set imgUri = '/roden-lady.jpg' %}
{% if abValue == 0 %}
{% set utmCampaign = 'utm_campaign=abw-vip' %}
{% set imgUri = '/roden-vip.jpg' %}
{{ app.session.set('rodenTeaserBannerABTest', 1) }}
{% else %}
{{ app.session.set('rodenTeaserBannerABTest', 0) }}
{% endif %}
{% set categoryBox = categoryBox|replace({'utm_campaign=roden_pop': utmCampaign, '/slivki-img/1496324948_.jpg': imgUri}) %}
{% set categoryBanner = app.user and app.user.hasRole(constant('\\\\Slivki\\\\Entity\\\\UserGroup::ROLE_ADS_FREE')) ? ''
: getCategoryBanner(categoryID) %}
{% set categoryBox = categoryBox|replace({'<div id=\"category-banner-placeholder\" style=\"display:none\"></div>': categoryBanner}) %}
{% endif %}
{# end rodenTeaserBannerABTest #}
{{ categoryBox|raw }}
{% endfor %}
</div>
<div id=\"mainPagePromoTextPush\"></div>
{% if isMobileDevice() %}
{% include 'Slivki/mobile_link_block.html.twig' %}
{% endif %}", "Slivki/offers/category_list.html.twig", "/mnt/data/virtwww/vlad-slivki/templates/Slivki/offers/category_list.html.twig");
}
}