var/cache/dev/twig/16/16a8a56bac9693d8c45ad4cee73ef010.php line 40

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. /* Shop/brandList.html.twig */
  14. class __TwigTemplate_7f032ba40fcea4848d1553cc6f71eb11 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->blocks = [
  23.             'content' => [$this'block_content'],
  24.         ];
  25.         $this->sandbox $this->env->getExtension('\Twig\Extension\SandboxExtension');
  26.         $this->checkSecurity();
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 1
  31.         return "product.html.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Shop/brandList.html.twig"));
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Shop/brandList.html.twig"));
  40.         $this->parent $this->loadTemplate("product.html.twig""Shop/brandList.html.twig"1);
  41.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  42.         
  43.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  44.         
  45.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  46.     }
  47.     // line 2
  48.     public function block_content($context, array $blocks = [])
  49.     {
  50.         $macros $this->macros;
  51.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  52.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  53.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  54.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  55.         // line 3
  56.         echo "  <style>
  57.     .category-color{
  58.           z-index: 999999 !important;
  59.           position: absolute !important;
  60.           margin-top: 3em !important;
  61.           margin-left: -3em !important;
  62.           color: white !important;
  63.           background-color: #000 !important;
  64.     }
  65.   </style>
  66.     <main id=\"main\" role=\"main\">
  67.       
  68.      ";
  69.         // line 15
  70.         $this->loadTemplate("Shop/includes/productTopMenu.html.twig""Shop/brandList.html.twig"15)->display(twig_array_merge($context, ["document" => (isset($context["document"]) || array_key_exists("document"$context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.'15$this->source); })()), "locale" => (isset($context["locale"]) || array_key_exists("locale"$context) ? $context["locale"] : (function () { throw new RuntimeError('Variable "locale" does not exist.'15$this->source); })())]));
  71.         // line 16
  72.         echo "
  73.       <div class=\"brands-block\">
  74.         <div class=\"container\">
  75.           <ul class=\"alphabet-list\">
  76.             
  77.                 ";
  78.         // line 21
  79.         $context["num"] = false;
  80.         // line 22
  81.         echo "                ";
  82.         $context['_parent'] = $context;
  83.         $context['_seq'] = twig_ensure_traversable(range(19));
  84.         foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
  85.             // line 23
  86.             echo "                  ";
  87.             if (twig_in_filter($context["i"], (isset($context["filter"]) || array_key_exists("filter"$context) ? $context["filter"] : (function () { throw new RuntimeError('Variable "filter" does not exist.'23$this->source); })()))) {
  88.                 // line 24
  89.                 echo "                      ";
  90.                 $context["num"] = true;
  91.                 // line 25
  92.                 echo "                  ";
  93.             }
  94.             // line 26
  95.             echo "                ";
  96.         }
  97.         $_parent $context['_parent'];
  98.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
  99.         $context array_intersect_key($context$_parent) + $_parent;
  100.         // line 27
  101.         echo "                
  102.            
  103.             <li class=\"";
  104.         // line 29
  105.         echo (((isset($context["num"]) || array_key_exists("num"$context) ? $context["num"] : (function () { throw new RuntimeError('Variable "num" does not exist.'29$this->source); })())) ? ("active") : (""));
  106.         echo "\"><a href=\"#scroll-1-9\" class=\"smooth-scroll\">1-9</a></li>
  107.             ";
  108.         // line 30
  109.         $context["alphas"] = range("A""Z");
  110.         // line 31
  111.         echo "            ";
  112.         $context['_parent'] = $context;
  113.         $context['_seq'] = twig_ensure_traversable((isset($context["alphas"]) || array_key_exists("alphas"$context) ? $context["alphas"] : (function () { throw new RuntimeError('Variable "alphas" does not exist.'31$this->source); })()));
  114.         foreach ($context['_seq'] as $context["_key"] => $context["alpha"]) {
  115.             // line 32
  116.             echo "            
  117.                 <li><a class=\"";
  118.             // line 33
  119.             echo ((twig_in_filter($context["alpha"], (isset($context["filter"]) || array_key_exists("filter"$context) ? $context["filter"] : (function () { throw new RuntimeError('Variable "filter" does not exist.'33$this->source); })()))) ? ("") : ("disabled "));
  120.             echo "smooth-scroll\" href=\"#scroll-";
  121.             echo twig_escape_filter($this->envtwig_lower_filter($this->env$this->sandbox->ensureToStringAllowed($context["alpha"], 33$this->source)), "html"nulltrue);
  122.             echo "\">";
  123.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed($context["alpha"], 33$this->source), "html"nulltrue);
  124.             echo "</a></li>
  125.             ";
  126.         }
  127.         $_parent $context['_parent'];
  128.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['alpha'], $context['_parent'], $context['loop']);
  129.         $context array_intersect_key($context$_parent) + $_parent;
  130.         // line 35
  131.         echo "          </ul>
  132.           ";
  133.         // line 36
  134.         $context["num"] = false;
  135.         echo "                 
  136.             ";
  137.         // line 37
  138.         $context['_parent'] = $context;
  139.         $context['_seq'] = twig_ensure_traversable((isset($context["brandsSorted"]) || array_key_exists("brandsSorted"$context) ? $context["brandsSorted"] : (function () { throw new RuntimeError('Variable "brandsSorted" does not exist.'37$this->source); })()));
  140.         foreach ($context['_seq'] as $context["key"] => $context["brands"]) {
  141.             // line 38
  142.             echo "              <div class=\"brand-list-block\" id=\"scroll-";
  143.             echo twig_escape_filter($this->envtwig_lower_filter($this->env$this->sandbox->ensureToStringAllowed($context["key"], 38$this->source)), "html"nulltrue);
  144.             echo "\">
  145.                 <h2>";
  146.             // line 39
  147.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed($context["key"], 39$this->source), "html"nulltrue);
  148.             echo "</h2>
  149.                   <ul class=\"brand-list\">                    
  150.                       ";
  151.             // line 41
  152.             $context['_parent'] = $context;
  153.             $context['_seq'] = twig_ensure_traversable($context["brands"]);
  154.             foreach ($context['_seq'] as $context["_key"] => $context["brand"]) {
  155.                 // line 42
  156.                 echo "                          ";
  157.                 $context["url"] = ((("/" $this->sandbox->ensureToStringAllowed((isset($context["locale"]) || array_key_exists("locale"$context) ? $context["locale"] : (function () { throw new RuntimeError('Variable "locale" does not exist.'42$this->source); })()), 42$this->source)) . "/product/list?category=") . $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["brand"], "getId", [], "method"falsefalsetrue42), 42$this->source));
  158.                 // line 43
  159.                 echo "                          <li class=\"brand-wrap\">                          
  160.                                 <div class=\"logo\" title=\"";
  161.                 // line 44
  162.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["brand"], "getAlcoholType", [], "method"falsefalsetrue44), 44$this->source), "html"nulltrue);
  163.                 echo "\">
  164.                                   <div class=\"logo-wrap\">
  165.                                     <a class=\"brand-link\" href=\"";
  166.                 // line 46
  167.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["url"]) || array_key_exists("url"$context) ? $context["url"] : (function () { throw new RuntimeError('Variable "url" does not exist.'46$this->source); })()), 46$this->source), "html"nulltrue);
  168.                 echo "\" title=\"";
  169.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["brand"], "getAlcoholType", [], "method"falsefalsetrue46), 46$this->source), "html"nulltrue);
  170.                 echo "\">
  171.                                     ";
  172.                 // line 47
  173.                 if (twig_get_attribute($this->env$this->source$context["brand"], "getTypeImage", [], "method"falsefalsetrue47)) {
  174.                     // line 48
  175.                     echo "                                      ";
  176.                     echo $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["brand"], "getTypeImage", [], "method"falsefalsetrue48), "getThumbnail", ["brand"], "method"falsefalsetrue48), "html", [], "any"falsefalsetrue48), 48$this->source);
  177.                     echo "
  178.                                       <h2 class=\"category-color\">";
  179.                     // line 49
  180.                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["brand"], "getAlcoholType", [], "method"falsefalsetrue49), 49$this->source), "html"nulltrue);
  181.                     echo "</h2>
  182.                                     ";
  183.                 } else {
  184.                     // line 51
  185.                     echo "                                        <h2>";
  186.                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["brand"], "getAlcoholType", [], "method"falsefalsetrue51), 51$this->source), "html"nulltrue);
  187.                     echo "</h2>
  188.                                     ";
  189.                 }
  190.                 // line 53
  191.                 echo "                                    </a>
  192.                                   </div>
  193.                                 </div>
  194.                           </li>
  195.                       ";
  196.             }
  197.             $_parent $context['_parent'];
  198.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['brand'], $context['_parent'], $context['loop']);
  199.             $context array_intersect_key($context$_parent) + $_parent;
  200.             // line 57
  201.             echo "                  
  202.                   </ul>
  203.               </div>
  204.             ";
  205.         }
  206.         $_parent $context['_parent'];
  207.         unset($context['_seq'], $context['_iterated'], $context['key'], $context['brands'], $context['_parent'], $context['loop']);
  208.         $context array_intersect_key($context$_parent) + $_parent;
  209.         // line 60
  210.         echo "               
  211.         </div>
  212.       </div>
  213.     </main>
  214. ";
  215.         
  216.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  217.         
  218.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  219.     }
  220.     /**
  221.      * @codeCoverageIgnore
  222.      */
  223.     public function getTemplateName()
  224.     {
  225.         return "Shop/brandList.html.twig";
  226.     }
  227.     /**
  228.      * @codeCoverageIgnore
  229.      */
  230.     public function isTraitable()
  231.     {
  232.         return false;
  233.     }
  234.     /**
  235.      * @codeCoverageIgnore
  236.      */
  237.     public function getDebugInfo()
  238.     {
  239.         return array (  224 => 60,  215 => 57,  205 => 53,  199 => 51,  194 => 49,  189 => 48,  187 => 47,  181 => 46,  176 => 44,  173 => 43,  170 => 42,  166 => 41,  161 => 39,  156 => 38,  152 => 37,  148 => 36,  145 => 35,  133 => 33,  130 => 32,  125 => 31,  123 => 30,  119 => 29,  115 => 27,  109 => 26,  106 => 25,  103 => 24,  100 => 23,  95 => 22,  93 => 21,  86 => 16,  84 => 15,  70 => 3,  60 => 2,  37 => 1,);
  240.     }
  241.     public function getSourceContext()
  242.     {
  243.         return new Source("{% extends 'product.html.twig' %}
  244. {% block content %}
  245.   <style>
  246.     .category-color{
  247.           z-index: 999999 !important;
  248.           position: absolute !important;
  249.           margin-top: 3em !important;
  250.           margin-left: -3em !important;
  251.           color: white !important;
  252.           background-color: #000 !important;
  253.     }
  254.   </style>
  255.     <main id=\"main\" role=\"main\">
  256.       
  257.      {% include 'Shop/includes/productTopMenu.html.twig' with {'document': document, 'locale' : locale} %}
  258.       <div class=\"brands-block\">
  259.         <div class=\"container\">
  260.           <ul class=\"alphabet-list\">
  261.             
  262.                 {% set num = false %}
  263.                 {% for i in 1..9 %}
  264.                   {% if i in filter %}
  265.                       {% set num = true %}
  266.                   {% endif %}
  267.                 {% endfor %}
  268.                 
  269.            
  270.             <li class=\"{{ num ? 'active' : '' }}\"><a href=\"#scroll-1-9\" class=\"smooth-scroll\">1-9</a></li>
  271.             {% set alphas = range('A', 'Z') %}
  272.             {% for alpha in alphas%}
  273.             
  274.                 <li><a class=\"{{ alpha in filter ? '' : 'disabled ' }}smooth-scroll\" href=\"#scroll-{{ alpha|lower }}\">{{ alpha }}</a></li>
  275.             {% endfor %}
  276.           </ul>
  277.           {% set num = false %}                 
  278.             {% for key,brands in brandsSorted %}
  279.               <div class=\"brand-list-block\" id=\"scroll-{{ key|lower }}\">
  280.                 <h2>{{ key }}</h2>
  281.                   <ul class=\"brand-list\">                    
  282.                       {% for brand in brands %}
  283.                           {% set url = \"/\" ~ locale ~ \"/product/list?category=\" ~ brand.getId() %}
  284.                           <li class=\"brand-wrap\">                          
  285.                                 <div class=\"logo\" title=\"{{ brand.getAlcoholType() }}\">
  286.                                   <div class=\"logo-wrap\">
  287.                                     <a class=\"brand-link\" href=\"{{ url }}\" title=\"{{ brand.getAlcoholType() }}\">
  288.                                     {% if brand.getTypeImage() %}
  289.                                       {{ brand.getTypeImage().getThumbnail('brand').html|raw }}
  290.                                       <h2 class=\"category-color\">{{ brand.getAlcoholType() }}</h2>
  291.                                     {% else %}
  292.                                         <h2>{{ brand.getAlcoholType() }}</h2>
  293.                                     {% endif %}
  294.                                     </a>
  295.                                   </div>
  296.                                 </div>
  297.                           </li>
  298.                       {% endfor %}                  
  299.                   </ul>
  300.               </div>
  301.             {% endfor %}               
  302.         </div>
  303.       </div>
  304.     </main>
  305. {% endblock %}
  306. ""Shop/brandList.html.twig""/var/www/vhosts/centricdxb.com/pim2.centricdxb.com/templates/Shop/brandList.html.twig");
  307.     }
  308.     
  309.     public function checkSecurity()
  310.     {
  311.         static $tags = array("include" => 15"set" => 21"for" => 22"if" => 23);
  312.         static $filters = array("escape" => 33"lower" => 33"raw" => 48);
  313.         static $functions = array("range" => 22);
  314.         try {
  315.             $this->sandbox->checkSecurity(
  316.                 ['include''set''for''if'],
  317.                 ['escape''lower''raw'],
  318.                 ['range']
  319.             );
  320.         } catch (SecurityError $e) {
  321.             $e->setSourceContext($this->source);
  322.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  323.                 $e->setTemplateLine($tags[$e->getTagName()]);
  324.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  325.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  326.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  327.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  328.             }
  329.             throw $e;
  330.         }
  331.     }
  332. }