<?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;
/* Includes/topnav.html.twig */
class __TwigTemplate_b0a630af391cf8388f3557cfa50080c9 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
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", "Includes/topnav.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Includes/topnav.html.twig"));
// line 1
$context["referer"] = ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["app"] ?? null), "request", [], "any", false, true, true, 1), "server", [], "any", false, true, true, 1), "get", ["http-referer"], "method", true, true, true, 1)) ? (_twig_default_filter($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["app"] ?? null), "request", [], "any", false, true, true, 1), "server", [], "any", false, true, true, 1), "get", ["http-referer"], "method", false, false, true, 1), 1, $this->source), "/")) : ("/"));
// line 2
echo twig_escape_filter($this->env, $this->extensions['App\Twig\AppExtension']->setCookie($this->sandbox->ensureToStringAllowed((isset($context["referer"]) || array_key_exists("referer", $context) ? $context["referer"] : (function () { throw new RuntimeError('Variable "referer" does not exist.', 2, $this->source); })()), 2, $this->source)), "html", null, true);
echo "
<header id=\"header\">
<div class=\"container\">
<!-- page logo -->
<div class=\"logo\">
<a href=\"/";
// line 9
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["locale"]) || array_key_exists("locale", $context) ? $context["locale"] : (function () { throw new RuntimeError('Variable "locale" does not exist.', 9, $this->source); })()), 9, $this->source), "html", null, true);
echo "/\">
<img id=\"logo\" src=\"/logo_image.jpg\" width=\"80\" alt=\"image description\">
</a>
</div>
<div class=\"sitetitle\">
<ul>
<li class=\"active site-title\"><a href=\"/";
// line 15
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["locale"]) || array_key_exists("locale", $context) ? $context["locale"] : (function () { throw new RuntimeError('Variable "locale" does not exist.', 15, $this->source); })()), 15, $this->source), "html", null, true);
echo "/\">DEMO ITHRA DAM</a></li>
</ul>
</div>
";
// line 18
$context["navStartNode"] = $this->extensions['App\Twig\AppExtension']->getNavStartNode();
// line 19
echo " ";
echo $this->env->getFunction('pimcore_inc')->getCallable()((((("/" . $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["navStartNode"]) || array_key_exists("navStartNode", $context) ? $context["navStartNode"] : (function () { throw new RuntimeError('Variable "navStartNode" does not exist.', 19, $this->source); })()), "getKey", [], "method", false, false, true, 19), 19, $this->source)) . "/") . $this->sandbox->ensureToStringAllowed((isset($context["locale"]) || array_key_exists("locale", $context) ? $context["locale"] : (function () { throw new RuntimeError('Variable "locale" does not exist.', 19, $this->source); })()), 19, $this->source)) . "/shared/top-nav-cart"));
echo "
</div>
<nav id=\"nav\">
<!-- menu opener of the page -->
<a href=\"#\" class=\"nav-opener\"><span></span></a>
<div class=\"nav-drop\">
<div class=\"nav-wrap\">
<!-- navigation of the page -->
<ul class=\"navigation\">
<li class=\"country\">
<img alt=\"flag\" src=\"";
// line 32
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["country"]) || array_key_exists("country", $context) ? $context["country"] : (function () { throw new RuntimeError('Variable "country" does not exist.', 32, $this->source); })()), "getFlagIconImage", [], "method", false, false, true, 32), "getUrl", [], "method", false, false, true, 32), 32, $this->source), "html", null, true);
echo "\"></img>
";
// line 33
echo twig_escape_filter($this->env, (((twig_get_attribute($this->env, $this->source, (isset($context["country"]) || array_key_exists("country", $context) ? $context["country"] : (function () { throw new RuntimeError('Variable "country" does not exist.', 33, $this->source); })()), "GetName", [], "method", false, false, true, 33) == "International")) ? (twig_get_attribute($this->env, $this->source, (isset($context["country"]) || array_key_exists("country", $context) ? $context["country"] : (function () { throw new RuntimeError('Variable "country" does not exist.', 33, $this->source); })()), "GetName", [], "method", false, false, true, 33)) : ($this->extensions['App\Twig\AppExtension']->getRegionBundle($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["country"]) || array_key_exists("country", $context) ? $context["country"] : (function () { throw new RuntimeError('Variable "country" does not exist.', 33, $this->source); })()), "GetName", [], "method", false, false, true, 33), 33, $this->source)))), "html", null, true);
echo "
</li>
<li><a href=\"/";
// line 36
echo twig_escape_filter($this->env, twig_lower_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["locale"]) || array_key_exists("locale", $context) ? $context["locale"] : (function () { throw new RuntimeError('Variable "locale" does not exist.', 36, $this->source); })()), 36, $this->source)), "html", null, true);
echo "/brand/list\">Categories A-Z</a>
";
// line 38
if ( !(isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 38, $this->source); })())) {
// line 39
echo " <li><a href=\"";
echo twig_escape_filter($this->env, $this->env->getFunction('pimcore_url')->getCallable()(["prefix" => twig_lower_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["locale"]) || array_key_exists("locale", $context) ? $context["locale"] : (function () { throw new RuntimeError('Variable "locale" does not exist.', 39, $this->source); })()), 39, $this->source))], "product-landing", ["absolute" => false]), "html", null, true);
echo "\">Documents</a>
<div class=\"dropdown\">
<div class=\"container\">
<div class=\"top-block\">
</div>
<div class=\"bottom-block\">
<div class=\"row\">
";
// line 48
$context["filterDefinition2"] = $this->extensions['App\Twig\AppExtension']->getFilterDefinitions();
// line 49
echo "
";
// line 50
$context["products2"] = $this->extensions['App\Twig\AppExtension']->getProductList($this->sandbox->ensureToStringAllowed((isset($context["filterDefinition2"]) || array_key_exists("filterDefinition2", $context) ? $context["filterDefinition2"] : (function () { throw new RuntimeError('Variable "filterDefinition2" does not exist.', 50, $this->source); })()), 50, $this->source), $this->sandbox->ensureToStringAllowed(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.', 50, $this->source); })()), "request", [], "any", false, false, true, 50), 50, $this->source));
// line 51
echo " ";
$context["valuesIndex"] = $this->extensions['App\Twig\AppExtension']->getValueIndex($this->sandbox->ensureToStringAllowed((isset($context["filterDefinition2"]) || array_key_exists("filterDefinition2", $context) ? $context["filterDefinition2"] : (function () { throw new RuntimeError('Variable "filterDefinition2" does not exist.', 51, $this->source); })()), 51, $this->source), $this->sandbox->ensureToStringAllowed((isset($context["products2"]) || array_key_exists("products2", $context) ? $context["products2"] : (function () { throw new RuntimeError('Variable "products2" does not exist.', 51, $this->source); })()), 51, $this->source));
// line 52
echo "
";
// line 53
$context["showcount"] = 0;
// line 54
echo " ";
$context["subCategories"] = $this->extensions['App\Twig\AppExtension']->getsubCategories();
// line 55
echo " ";
$context["x"] = 0;
// line 56
echo "
";
// line 57
if ((isset($context["subCategories"]) || array_key_exists("subCategories", $context) ? $context["subCategories"] : (function () { throw new RuntimeError('Variable "subCategories" does not exist.', 57, $this->source); })())) {
// line 58
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.', 58, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["subCategory"]) {
// line 59
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, 59), [], "array", true, true, true, 59) && (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.', 59, $this->source); })()), twig_get_attribute($this->env, $this->source, $context["subCategory"], "getId", [], "method", false, false, true, 59), [], "array", false, false, true, 59) > 0))) {
// line 60
echo " ";
$context["url"] = twig_get_attribute($this->env, $this->source, $context["subCategory"], "getDetailUrl", [["rootCategory" => twig_get_attribute($this->env, $this->source, $context["subCategory"], "getParent", [], "method", false, false, true, 60), "document" => (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 60, $this->source); })())]], "method", false, false, true, 60);
// line 61
echo " ";
$context["x"] = ((isset($context["x"]) || array_key_exists("x", $context) ? $context["x"] : (function () { throw new RuntimeError('Variable "x" does not exist.', 61, $this->source); })()) + 1);
// line 62
echo " <div class=\"col-sm-2 col-sm-2-";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["x"]) || array_key_exists("x", $context) ? $context["x"] : (function () { throw new RuntimeError('Variable "x" does not exist.', 62, $this->source); })()), 62, $this->source), "html", null, true);
echo "\">
<ul class=\"liquor-type\">
<li>
<a href=\"";
// line 65
echo twig_escape_filter($this->env, twig_lower_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.', 65, $this->source); })()), 65, $this->source)), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["subCategory"], "getName", [], "method", false, false, true, 65), 65, $this->source), "html", null, true);
echo "</a>
";
// line 66
if (twig_get_attribute($this->env, $this->source, $context["subCategory"], "getChildren", [], "method", false, false, true, 66)) {
// line 67
echo " <ul>
";
// line 68
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["subCategory"], "getChildren", [], "method", false, false, true, 68));
foreach ($context['_seq'] as $context["_key"] => $context["sub"]) {
// line 69
echo " ";
$context["suburl"] = 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, 69), "document" => (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 69, $this->source); })())]], "method", false, false, true, 69);
// line 70
echo " ";
$context["subId"] = twig_get_attribute($this->env, $this->source, $context["sub"], "getId", [], "method", false, false, true, 70);
// line 71
echo " ";
if ((twig_in_filter((isset($context["subId"]) || array_key_exists("subId", $context) ? $context["subId"] : (function () { throw new RuntimeError('Variable "subId" does not exist.', 71, $this->source); })()), (isset($context["valuesIndex"]) || array_key_exists("valuesIndex", $context) ? $context["valuesIndex"] : (function () { throw new RuntimeError('Variable "valuesIndex" does not exist.', 71, $this->source); })())) && (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.', 71, $this->source); })()), (isset($context["subId"]) || array_key_exists("subId", $context) ? $context["subId"] : (function () { throw new RuntimeError('Variable "subId" does not exist.', 71, $this->source); })()), [], "array", false, false, true, 71) > 0))) {
// line 72
echo " <li><a href=\"";
echo twig_escape_filter($this->env, twig_lower_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.', 72, $this->source); })()), 72, $this->source)), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["sub"], "getName", [], "method", false, false, true, 72), 72, $this->source), "html", null, true);
echo "</a></li>
";
}
// line 74
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 75
echo " </ul>
";
}
// line 77
echo " </li>
</ul>
</div>
";
}
// line 81
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 82
echo " ";
}
// line 83
echo " </div>
</div>
</div>
</div>
</li>
";
}
// line 88
echo "
</ul>
<!-- search form of the page -->
<form class=\"search-form\" action=\"/";
// line 92
echo twig_escape_filter($this->env, twig_lower_filter($this->env, $this->sandbox->ensureToStringAllowed(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.', 92, $this->source); })()), "request", [], "any", false, false, true, 92), "getLocale", [], "method", false, false, true, 92), 92, $this->source)), "html", null, true);
echo "/product/list\" method=\"GET\">
<input type=\"search\" name=\"search\" id=\"search\" placeholder=\"";
// line 93
echo twig_escape_filter($this->env, ((array_key_exists("search", $context)) ? ((isset($context["search"]) || array_key_exists("search", $context) ? $context["search"] : (function () { throw new RuntimeError('Variable "search" does not exist.', 93, $this->source); })())) : ($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("espirits.header.search"))), "html", null, true);
echo "\" class=\"form-control\">
<button type=\"submit\"><span class=\"icon-search\"></span></button>
</form>
</div>
</div>
</nav>
</header>
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "Includes/topnav.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 243 => 93, 239 => 92, 233 => 88, 225 => 83, 222 => 82, 216 => 81, 210 => 77, 206 => 75, 200 => 74, 192 => 72, 189 => 71, 186 => 70, 183 => 69, 179 => 68, 176 => 67, 174 => 66, 168 => 65, 161 => 62, 158 => 61, 155 => 60, 152 => 59, 147 => 58, 145 => 57, 142 => 56, 139 => 55, 136 => 54, 134 => 53, 131 => 52, 128 => 51, 126 => 50, 123 => 49, 121 => 48, 108 => 39, 106 => 38, 101 => 36, 95 => 33, 91 => 32, 74 => 19, 72 => 18, 66 => 15, 57 => 9, 47 => 2, 45 => 1,);
}
public function getSourceContext()
{
return new Source("{% set referer = app.request.server.get('http-referer')|default('/') %}
{{ setCookie(referer) }}
<header id=\"header\">
<div class=\"container\">
<!-- page logo -->
<div class=\"logo\">
<a href=\"/{{ locale }}/\">
<img id=\"logo\" src=\"/logo_image.jpg\" width=\"80\" alt=\"image description\">
</a>
</div>
<div class=\"sitetitle\">
<ul>
<li class=\"active site-title\"><a href=\"/{{ locale }}/\">DEMO ITHRA DAM</a></li>
</ul>
</div>
{% set navStartNode = getNavStartNode() %}
{{ pimcore_inc('/' ~ navStartNode.getKey() ~ '/' ~ locale ~ '/shared/top-nav-cart') }}
</div>
<nav id=\"nav\">
<!-- menu opener of the page -->
<a href=\"#\" class=\"nav-opener\"><span></span></a>
<div class=\"nav-drop\">
<div class=\"nav-wrap\">
<!-- navigation of the page -->
<ul class=\"navigation\">
<li class=\"country\">
<img alt=\"flag\" src=\"{{ country.getFlagIconImage().getUrl() }}\"></img>
{{ (country.GetName() == 'International') ? country.GetName() : getRegionBundle(country.GetName()) }}
</li>
<li><a href=\"/{{ locale|lower }}/brand/list\">Categories A-Z</a>
{% if not editmode %}
<li><a href=\"{{ pimcore_url({'prefix': locale|lower}, 'product-landing', {'absolute': false}) }}\">Documents</a>
<div class=\"dropdown\">
<div class=\"container\">
<div class=\"top-block\">
</div>
<div class=\"bottom-block\">
<div class=\"row\">
{% set filterDefinition2 = getFilterDefinitions() %}
{% set products2 = getProductList(filterDefinition2, app.request) %}
{% set valuesIndex = getValueIndex(filterDefinition2,products2) %}
{% set showcount = 0 %}
{% set subCategories = getsubCategories() %}
{% set x = 0 %}
{% if subCategories %}
{% for subCategory in subCategories %}
{% if valuesIndex[subCategory.getId()] is defined and valuesIndex[subCategory.getId()] > 0 %}
{% set url = subCategory.getDetailUrl({\"rootCategory\" : subCategory.getParent(), \"document\" : document}) %}
{% set x = x + 1 %}
<div class=\"col-sm-2 col-sm-2-{{ x }}\">
<ul class=\"liquor-type\">
<li>
<a href=\"{{ url|lower }}\">{{ subCategory.getName() }}</a>
{% if subCategory.getChildren() %}
<ul>
{% for sub in subCategory.getChildren() %}
{% set suburl = sub.getDetailUrl({\"rootCategory\" : sub.parent, \"document\" : document}) %}
{% set subId = sub.getId() %}
{% if subId in valuesIndex and valuesIndex[subId] > 0 %}
<li><a href=\"{{ suburl|lower }}\">{{ sub.getName() }}</a></li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
</li>
</ul>
</div>
{% endif %}
{% endfor %}
{% endif %}
</div>
</div>
</div>
</div>
</li>
{% endif %}
</ul>
<!-- search form of the page -->
<form class=\"search-form\" action=\"/{{ app.request.getLocale()|lower }}/product/list\" method=\"GET\">
<input type=\"search\" name=\"search\" id=\"search\" placeholder=\"{{ (search is defined) ? search : 'espirits.header.search'|trans }}\" class=\"form-control\">
<button type=\"submit\"><span class=\"icon-search\"></span></button>
</form>
</div>
</div>
</nav>
</header>
", "Includes/topnav.html.twig", "/var/www/vhosts/centricdxb.com/pim2.centricdxb.com/templates/Includes/topnav.html.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 1, "if" => 38, "for" => 58);
static $filters = array("default" => 1, "escape" => 2, "lower" => 36, "trans" => 93);
static $functions = array("setCookie" => 2, "getNavStartNode" => 18, "pimcore_inc" => 19, "getRegionBundle" => 33, "pimcore_url" => 39, "getFilterDefinitions" => 48, "getProductList" => 50, "getValueIndex" => 51, "getsubCategories" => 54);
try {
$this->sandbox->checkSecurity(
['set', 'if', 'for'],
['default', 'escape', 'lower', 'trans'],
['setCookie', 'getNavStartNode', 'pimcore_inc', 'getRegionBundle', 'pimcore_url', 'getFilterDefinitions', 'getProductList', 'getValueIndex', 'getsubCategories']
);
} 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;
}
}
}