var/cache/dev/twig/02/0214c3aad4b7be834737c020ac0b441d.php line 50

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/productLanding.html.twig */
  14. class __TwigTemplate_9aab24d9119ff602b1cc939b3e615370 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/productLanding.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/productLanding.html.twig"));
  40.         $this->parent $this->loadTemplate("product.html.twig""Shop/productLanding.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 "
  57. <main id=\"main\" role=\"main\">
  58.   ";
  59.         // line 5
  60.         $this->loadTemplate("Shop/includes/productTopMenu.html.twig""Shop/productLanding.html.twig"5)->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.'5$this->source); })()), "locale" => (isset($context["locale"]) || array_key_exists("locale"$context) ? $context["locale"] : (function () { throw new RuntimeError('Variable "locale" does not exist.'5$this->source); })())]));
  61.         // line 6
  62.         echo "  
  63.   <div class=\"products-info same-height-holder\">
  64.     <div class=\"container\">
  65.       <div class=\"row\">
  66.         ";
  67.         // line 10
  68.         if ((isset($context["subCategories"]) || array_key_exists("subCategories"$context) ? $context["subCategories"] : (function () { throw new RuntimeError('Variable "subCategories" does not exist.'10$this->source); })())) {
  69.             // line 11
  70.             echo "          ";
  71.             $context['_parent'] = $context;
  72.             $context['_seq'] = twig_ensure_traversable((isset($context["subCategories"]) || array_key_exists("subCategories"$context) ? $context["subCategories"] : (function () { throw new RuntimeError('Variable "subCategories" does not exist.'11$this->source); })()));
  73.             foreach ($context['_seq'] as $context["_key"] => $context["subCategory"]) {
  74.                 // line 12
  75.                 echo "            ";
  76.                 if ((twig_get_attribute($this->env$this->source, ($context["valuesIndex"] ?? null), twig_get_attribute($this->env$this->source$context["subCategory"], "getId", [], "method"falsefalsetrue12), [], "array"truetruetrue12) && (twig_get_attribute($this->env$this->source, (isset($context["valuesIndex"]) || array_key_exists("valuesIndex"$context) ? $context["valuesIndex"] : (function () { throw new RuntimeError('Variable "valuesIndex" does not exist.'12$this->source); })()), twig_get_attribute($this->env$this->source$context["subCategory"], "getId", [], "method"falsefalsetrue12), [], "array"falsefalsetrue12) > 0))) {
  77.                     // line 13
  78.                     echo "                ";
  79.                     $context["url"] = (((isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'13$this->source); })())) ? ("") : (twig_get_attribute($this->env$this->source$context["subCategory"], "getDetailUrl", [["rootCategory" => twig_get_attribute($this->env$this->source$context["subCategory"], "parent", [], "any"falsefalsetrue13), "document" => (isset($context["document"]) || array_key_exists("document"$context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.'13$this->source); })())]], "method"falsefalsetrue13)));
  80.                     // line 14
  81.                     echo "                <div class=\"col-sm-4\">
  82.                   <div class=\"product-post hover-js\" onclick=\"location.href='";
  83.                     // line 15
  84.                     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.'15$this->source); })()), 15$this->source), "html"nulltrue);
  85.                     echo "';\">
  86.                       <div class=\"img-holder\">
  87.                             ";
  88.                     // line 17
  89.                     if (twig_get_attribute($this->env$this->source$context["subCategory"], "getTypeImage", [], "method"falsefalsetrue17)) {
  90.                         // line 18
  91.                         echo "                              ";
  92.                         echo $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["subCategory"], "getTypeImage", [], "method"falsefalsetrue18), "getThumbnail", ["alcoholtype"], "method"falsefalsetrue18), "getHtml", [["width" => 300"height" => 222]], "method"falsefalsetrue18), 18$this->source);
  93.                         echo "
  94.                             ";
  95.                     }
  96.                     // line 20
  97.                     echo "                      <div class=\"hover-overlay\">
  98.                       ";
  99.                     // line 21
  100.                     if (twig_get_attribute($this->env$this->source$context["subCategory"], "getChildren", [], "method"falsefalsetrue21)) {
  101.                         // line 22
  102.                         echo "                          <ul>
  103.                              ";
  104.                         // line 23
  105.                         $context['_parent'] = $context;
  106.                         $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source$context["subCategory"], "getChildren", [], "method"falsefalsetrue23));
  107.                         foreach ($context['_seq'] as $context["_key"] => $context["sub"]) {
  108.                             // line 24
  109.                             echo "                                  ";
  110.                             $context["suburl"] = (((isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'24$this->source); })())) ? ("") : (twig_get_attribute($this->env$this->source$context["sub"], "getDetailUrl", [["rootCategory" => twig_get_attribute($this->env$this->source$context["sub"], "parent", [], "any"falsefalsetrue24), "document" => (isset($context["document"]) || array_key_exists("document"$context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.'24$this->source); })())]], "method"falsefalsetrue24)));
  111.                             // line 25
  112.                             echo "                            
  113.                                   ";
  114.                             // line 26
  115.                             if ((twig_get_attribute($this->env$this->source, ($context["valuesIndex"] ?? null), twig_get_attribute($this->env$this->source$context["sub"], "getId", [], "method"falsefalsetrue26), [], "array"truetruetrue26) && (twig_get_attribute($this->env$this->source, (isset($context["valuesIndex"]) || array_key_exists("valuesIndex"$context) ? $context["valuesIndex"] : (function () { throw new RuntimeError('Variable "valuesIndex" does not exist.'26$this->source); })()), twig_get_attribute($this->env$this->source$context["sub"], "getId", [], "method"falsefalsetrue26), [], "array"falsefalsetrue26) > 0))) {
  116.                                 // line 27
  117.                                 echo "                                    <li>
  118.                                       <a href=\"";
  119.                                 // line 28
  120.                                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["suburl"]) || array_key_exists("suburl"$context) ? $context["suburl"] : (function () { throw new RuntimeError('Variable "suburl" does not exist.'28$this->source); })()), 28$this->source), "html"nulltrue);
  121.                                 echo "\">
  122.                                       <span class=\"info\">";
  123.                                 // line 29
  124.                                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["sub"], "getName", [], "method"falsefalsetrue29), 29$this->source), "html"nulltrue);
  125.                                 echo "</span>
  126.                                       <span class=\"amount\">";
  127.                                 // line 30
  128.                                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["valuesIndex"]) || array_key_exists("valuesIndex"$context) ? $context["valuesIndex"] : (function () { throw new RuntimeError('Variable "valuesIndex" does not exist.'30$this->source); })()), twig_get_attribute($this->env$this->source$context["sub"], "getId", [], "method"falsefalsetrue30), [], "array"falsefalsetrue30), 30$this->source), "html"nulltrue);
  129.                                 echo "</span>
  130.                                       </a>
  131.                                     </li>
  132.                                   ";
  133.                             }
  134.                             // line 34
  135.                             echo "                            ";
  136.                         }
  137.                         $_parent $context['_parent'];
  138.                         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['sub'], $context['_parent'], $context['loop']);
  139.                         $context array_intersect_key($context$_parent) + $_parent;
  140.                         // line 35
  141.                         echo "                          </ul>
  142.                       ";
  143.                     }
  144.                     // line 37
  145.                     echo "                    </div>
  146.                   </div>
  147.                   <a href=\"";
  148.                     // line 39
  149.                     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.'39$this->source); })()), 39$this->source), "html"nulltrue);
  150.                     echo "\" class=\"description same-height\">
  151.                     <strong class=\"text\">";
  152.                     // line 40
  153.                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["subCategory"], "getName", [], "method"falsefalsetrue40), 40$this->source), "html"nulltrue);
  154.                     echo "</strong>
  155.                     <span class=\"digit\">";
  156.                     // line 41
  157.                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["valuesIndex"]) || array_key_exists("valuesIndex"$context) ? $context["valuesIndex"] : (function () { throw new RuntimeError('Variable "valuesIndex" does not exist.'41$this->source); })()), twig_get_attribute($this->env$this->source$context["subCategory"], "getId", [], "method"falsefalsetrue41), [], "array"falsefalsetrue41), 41$this->source), "html"nulltrue);
  158.                     echo "</span>
  159.                   </a>
  160.                   </div>
  161.                 </div>
  162.             ";
  163.                 }
  164.                 // line 46
  165.                 echo "          ";
  166.             }
  167.             $_parent $context['_parent'];
  168.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['subCategory'], $context['_parent'], $context['loop']);
  169.             $context array_intersect_key($context$_parent) + $_parent;
  170.             // line 47
  171.             echo "        ";
  172.         }
  173.         // line 48
  174.         echo "      </div>
  175.     </div>
  176.   </div>
  177. </main>
  178. ";
  179.         
  180.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  181.         
  182.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  183.     }
  184.     /**
  185.      * @codeCoverageIgnore
  186.      */
  187.     public function getTemplateName()
  188.     {
  189.         return "Shop/productLanding.html.twig";
  190.     }
  191.     /**
  192.      * @codeCoverageIgnore
  193.      */
  194.     public function isTraitable()
  195.     {
  196.         return false;
  197.     }
  198.     /**
  199.      * @codeCoverageIgnore
  200.      */
  201.     public function getDebugInfo()
  202.     {
  203.         return array (  188 => 48,  185 => 47,  179 => 46,  171 => 41,  167 => 40,  163 => 39,  159 => 37,  155 => 35,  149 => 34,  142 => 30,  138 => 29,  134 => 28,  131 => 27,  129 => 26,  126 => 25,  123 => 24,  119 => 23,  116 => 22,  114 => 21,  111 => 20,  105 => 18,  103 => 17,  98 => 15,  95 => 14,  92 => 13,  89 => 12,  84 => 11,  82 => 10,  76 => 6,  74 => 5,  70 => 3,  60 => 2,  37 => 1,);
  204.     }
  205.     public function getSourceContext()
  206.     {
  207.         return new Source("{% extends 'product.html.twig' %}
  208. {% block content %}
  209. <main id=\"main\" role=\"main\">
  210.   {% include 'Shop/includes/productTopMenu.html.twig' with {'document': document, 'locale' : locale} %}
  211.   
  212.   <div class=\"products-info same-height-holder\">
  213.     <div class=\"container\">
  214.       <div class=\"row\">
  215.         {% if subCategories %}
  216.           {% for subCategory in subCategories %}
  217.             {% if valuesIndex[subCategory.getId()] is defined and valuesIndex[subCategory.getId()] > 0 %}
  218.                 {% set url = editmode ? '' : subCategory.getDetailUrl({\"rootCategory\" : subCategory.parent, \"document\" : document}) %}
  219.                 <div class=\"col-sm-4\">
  220.                   <div class=\"product-post hover-js\" onclick=\"location.href='{{ url }}';\">
  221.                       <div class=\"img-holder\">
  222.                             {% if subCategory.getTypeImage() %}
  223.                               {{ subCategory.getTypeImage().getThumbnail('alcoholtype').getHtml({\"width\" : 300, \"height\" : 222})|raw }}
  224.                             {% endif %}
  225.                       <div class=\"hover-overlay\">
  226.                       {% if subCategory.getChildren() %}
  227.                           <ul>
  228.                              {% for sub in subCategory.getChildren() %}
  229.                                   {% set suburl = editmode ? '' : sub.getDetailUrl({\"rootCategory\" : sub.parent, \"document\" : document}) %}
  230.                             
  231.                                   {% if valuesIndex[sub.getId()] is defined and valuesIndex[sub.getId()] > 0 %}
  232.                                     <li>
  233.                                       <a href=\"{{ suburl }}\">
  234.                                       <span class=\"info\">{{ sub.getName() }}</span>
  235.                                       <span class=\"amount\">{{ valuesIndex[sub.getId()] }}</span>
  236.                                       </a>
  237.                                     </li>
  238.                                   {% endif %}
  239.                             {% endfor %}
  240.                           </ul>
  241.                       {% endif %}
  242.                     </div>
  243.                   </div>
  244.                   <a href=\"{{ url }}\" class=\"description same-height\">
  245.                     <strong class=\"text\">{{ subCategory.getName() }}</strong>
  246.                     <span class=\"digit\">{{ valuesIndex[subCategory.getId()] }}</span>
  247.                   </a>
  248.                   </div>
  249.                 </div>
  250.             {% endif %}
  251.           {% endfor %}
  252.         {% endif %}
  253.       </div>
  254.     </div>
  255.   </div>
  256. </main>
  257. {% endblock %}""Shop/productLanding.html.twig""/var/www/vhosts/centricdxb.com/pim2.centricdxb.com/templates/Shop/productLanding.html.twig");
  258.     }
  259.     
  260.     public function checkSecurity()
  261.     {
  262.         static $tags = array("include" => 5"if" => 10"for" => 11"set" => 13);
  263.         static $filters = array("escape" => 15"raw" => 18);
  264.         static $functions = array();
  265.         try {
  266.             $this->sandbox->checkSecurity(
  267.                 ['include''if''for''set'],
  268.                 ['escape''raw'],
  269.                 []
  270.             );
  271.         } catch (SecurityError $e) {
  272.             $e->setSourceContext($this->source);
  273.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  274.                 $e->setTemplateLine($tags[$e->getTagName()]);
  275.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  276.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  277.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  278.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  279.             }
  280.             throw $e;
  281.         }
  282.     }
  283. }