<?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;
/* Shop/productLanding.html.twig */
class __TwigTemplate_9aab24d9119ff602b1cc939b3e615370 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'content' => [$this, 'block_content'],
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doGetParent(array $context)
{
// line 1
return "product.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Shop/productLanding.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Shop/productLanding.html.twig"));
$this->parent = $this->loadTemplate("product.html.twig", "Shop/productLanding.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 2
public function block_content($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 3
echo "
<main id=\"main\" role=\"main\">
";
// line 5
$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); })())]));
// line 6
echo "
<div class=\"products-info same-height-holder\">
<div class=\"container\">
<div class=\"row\">
";
// line 10
if ((isset($context["subCategories"]) || array_key_exists("subCategories", $context) ? $context["subCategories"] : (function () { throw new RuntimeError('Variable "subCategories" does not exist.', 10, $this->source); })())) {
// line 11
echo " ";
$context['_parent'] = $context;
$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); })()));
foreach ($context['_seq'] as $context["_key"] => $context["subCategory"]) {
// line 12
echo " ";
if ((twig_get_attribute($this->env, $this->source, ($context["valuesIndex"] ?? null), twig_get_attribute($this->env, $this->source, $context["subCategory"], "getId", [], "method", false, false, true, 12), [], "array", true, true, true, 12) && (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", false, false, true, 12), [], "array", false, false, true, 12) > 0))) {
// line 13
echo " ";
$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", false, false, true, 13), "document" => (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 13, $this->source); })())]], "method", false, false, true, 13)));
// line 14
echo " <div class=\"col-sm-4\">
<div class=\"product-post hover-js\" onclick=\"location.href='";
// line 15
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", null, true);
echo "';\">
<div class=\"img-holder\">
";
// line 17
if (twig_get_attribute($this->env, $this->source, $context["subCategory"], "getTypeImage", [], "method", false, false, true, 17)) {
// line 18
echo " ";
echo $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["subCategory"], "getTypeImage", [], "method", false, false, true, 18), "getThumbnail", ["alcoholtype"], "method", false, false, true, 18), "getHtml", [["width" => 300, "height" => 222]], "method", false, false, true, 18), 18, $this->source);
echo "
";
}
// line 20
echo " <div class=\"hover-overlay\">
";
// line 21
if (twig_get_attribute($this->env, $this->source, $context["subCategory"], "getChildren", [], "method", false, false, true, 21)) {
// line 22
echo " <ul>
";
// line 23
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["subCategory"], "getChildren", [], "method", false, false, true, 23));
foreach ($context['_seq'] as $context["_key"] => $context["sub"]) {
// line 24
echo " ";
$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", false, false, true, 24), "document" => (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 24, $this->source); })())]], "method", false, false, true, 24)));
// line 25
echo "
";
// line 26
if ((twig_get_attribute($this->env, $this->source, ($context["valuesIndex"] ?? null), twig_get_attribute($this->env, $this->source, $context["sub"], "getId", [], "method", false, false, true, 26), [], "array", true, true, true, 26) && (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", false, false, true, 26), [], "array", false, false, true, 26) > 0))) {
// line 27
echo " <li>
<a href=\"";
// line 28
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", null, true);
echo "\">
<span class=\"info\">";
// line 29
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["sub"], "getName", [], "method", false, false, true, 29), 29, $this->source), "html", null, true);
echo "</span>
<span class=\"amount\">";
// line 30
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", false, false, true, 30), [], "array", false, false, true, 30), 30, $this->source), "html", null, true);
echo "</span>
</a>
</li>
";
}
// line 34
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['sub'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 35
echo " </ul>
";
}
// line 37
echo " </div>
</div>
<a href=\"";
// line 39
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", null, true);
echo "\" class=\"description same-height\">
<strong class=\"text\">";
// line 40
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["subCategory"], "getName", [], "method", false, false, true, 40), 40, $this->source), "html", null, true);
echo "</strong>
<span class=\"digit\">";
// line 41
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", false, false, true, 41), [], "array", false, false, true, 41), 41, $this->source), "html", null, true);
echo "</span>
</a>
</div>
</div>
";
}
// line 46
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['subCategory'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 47
echo " ";
}
// line 48
echo " </div>
</div>
</div>
</main>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "Shop/productLanding.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{% extends 'product.html.twig' %}
{% block content %}
<main id=\"main\" role=\"main\">
{% include 'Shop/includes/productTopMenu.html.twig' with {'document': document, 'locale' : locale} %}
<div class=\"products-info same-height-holder\">
<div class=\"container\">
<div class=\"row\">
{% if subCategories %}
{% for subCategory in subCategories %}
{% if valuesIndex[subCategory.getId()] is defined and valuesIndex[subCategory.getId()] > 0 %}
{% set url = editmode ? '' : subCategory.getDetailUrl({\"rootCategory\" : subCategory.parent, \"document\" : document}) %}
<div class=\"col-sm-4\">
<div class=\"product-post hover-js\" onclick=\"location.href='{{ url }}';\">
<div class=\"img-holder\">
{% if subCategory.getTypeImage() %}
{{ subCategory.getTypeImage().getThumbnail('alcoholtype').getHtml({\"width\" : 300, \"height\" : 222})|raw }}
{% endif %}
<div class=\"hover-overlay\">
{% if subCategory.getChildren() %}
<ul>
{% for sub in subCategory.getChildren() %}
{% set suburl = editmode ? '' : sub.getDetailUrl({\"rootCategory\" : sub.parent, \"document\" : document}) %}
{% if valuesIndex[sub.getId()] is defined and valuesIndex[sub.getId()] > 0 %}
<li>
<a href=\"{{ suburl }}\">
<span class=\"info\">{{ sub.getName() }}</span>
<span class=\"amount\">{{ valuesIndex[sub.getId()] }}</span>
</a>
</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
</div>
</div>
<a href=\"{{ url }}\" class=\"description same-height\">
<strong class=\"text\">{{ subCategory.getName() }}</strong>
<span class=\"digit\">{{ valuesIndex[subCategory.getId()] }}</span>
</a>
</div>
</div>
{% endif %}
{% endfor %}
{% endif %}
</div>
</div>
</div>
</main>
{% endblock %}", "Shop/productLanding.html.twig", "/var/www/vhosts/centricdxb.com/pim2.centricdxb.com/templates/Shop/productLanding.html.twig");
}
public function checkSecurity()
{
static $tags = array("include" => 5, "if" => 10, "for" => 11, "set" => 13);
static $filters = array("escape" => 15, "raw" => 18);
static $functions = array();
try {
$this->sandbox->checkSecurity(
['include', 'if', 'for', 'set'],
['escape', 'raw'],
[]
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}