<?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/brandList.html.twig */
class __TwigTemplate_7f032ba40fcea4848d1553cc6f71eb11 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/brandList.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/brandList.html.twig"));
$this->parent = $this->loadTemplate("product.html.twig", "Shop/brandList.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 " <style>
.category-color{
z-index: 999999 !important;
position: absolute !important;
margin-top: 3em !important;
margin-left: -3em !important;
color: white !important;
background-color: #000 !important;
}
</style>
<main id=\"main\" role=\"main\">
";
// line 15
$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); })())]));
// line 16
echo "
<div class=\"brands-block\">
<div class=\"container\">
<ul class=\"alphabet-list\">
";
// line 21
$context["num"] = false;
// line 22
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(range(1, 9));
foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
// line 23
echo " ";
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); })()))) {
// line 24
echo " ";
$context["num"] = true;
// line 25
echo " ";
}
// line 26
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 27
echo "
<li class=\"";
// line 29
echo (((isset($context["num"]) || array_key_exists("num", $context) ? $context["num"] : (function () { throw new RuntimeError('Variable "num" does not exist.', 29, $this->source); })())) ? ("active") : (""));
echo "\"><a href=\"#scroll-1-9\" class=\"smooth-scroll\">1-9</a></li>
";
// line 30
$context["alphas"] = range("A", "Z");
// line 31
echo " ";
$context['_parent'] = $context;
$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); })()));
foreach ($context['_seq'] as $context["_key"] => $context["alpha"]) {
// line 32
echo "
<li><a class=\"";
// line 33
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 "));
echo "smooth-scroll\" href=\"#scroll-";
echo twig_escape_filter($this->env, twig_lower_filter($this->env, $this->sandbox->ensureToStringAllowed($context["alpha"], 33, $this->source)), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed($context["alpha"], 33, $this->source), "html", null, true);
echo "</a></li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['alpha'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 35
echo " </ul>
";
// line 36
$context["num"] = false;
echo "
";
// line 37
$context['_parent'] = $context;
$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); })()));
foreach ($context['_seq'] as $context["key"] => $context["brands"]) {
// line 38
echo " <div class=\"brand-list-block\" id=\"scroll-";
echo twig_escape_filter($this->env, twig_lower_filter($this->env, $this->sandbox->ensureToStringAllowed($context["key"], 38, $this->source)), "html", null, true);
echo "\">
<h2>";
// line 39
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed($context["key"], 39, $this->source), "html", null, true);
echo "</h2>
<ul class=\"brand-list\">
";
// line 41
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable($context["brands"]);
foreach ($context['_seq'] as $context["_key"] => $context["brand"]) {
// line 42
echo " ";
$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", false, false, true, 42), 42, $this->source));
// line 43
echo " <li class=\"brand-wrap\">
<div class=\"logo\" title=\"";
// line 44
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["brand"], "getAlcoholType", [], "method", false, false, true, 44), 44, $this->source), "html", null, true);
echo "\">
<div class=\"logo-wrap\">
<a class=\"brand-link\" href=\"";
// line 46
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", null, true);
echo "\" title=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["brand"], "getAlcoholType", [], "method", false, false, true, 46), 46, $this->source), "html", null, true);
echo "\">
";
// line 47
if (twig_get_attribute($this->env, $this->source, $context["brand"], "getTypeImage", [], "method", false, false, true, 47)) {
// line 48
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["brand"], "getTypeImage", [], "method", false, false, true, 48), "getThumbnail", ["brand"], "method", false, false, true, 48), "html", [], "any", false, false, true, 48), 48, $this->source);
echo "
<h2 class=\"category-color\">";
// line 49
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["brand"], "getAlcoholType", [], "method", false, false, true, 49), 49, $this->source), "html", null, true);
echo "</h2>
";
} else {
// line 51
echo " <h2>";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["brand"], "getAlcoholType", [], "method", false, false, true, 51), 51, $this->source), "html", null, true);
echo "</h2>
";
}
// line 53
echo " </a>
</div>
</div>
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['brand'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 57
echo "
</ul>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['key'], $context['brands'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 60
echo "
</div>
</div>
</main>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "Shop/brandList.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{% extends 'product.html.twig' %}
{% block content %}
<style>
.category-color{
z-index: 999999 !important;
position: absolute !important;
margin-top: 3em !important;
margin-left: -3em !important;
color: white !important;
background-color: #000 !important;
}
</style>
<main id=\"main\" role=\"main\">
{% include 'Shop/includes/productTopMenu.html.twig' with {'document': document, 'locale' : locale} %}
<div class=\"brands-block\">
<div class=\"container\">
<ul class=\"alphabet-list\">
{% set num = false %}
{% for i in 1..9 %}
{% if i in filter %}
{% set num = true %}
{% endif %}
{% endfor %}
<li class=\"{{ num ? 'active' : '' }}\"><a href=\"#scroll-1-9\" class=\"smooth-scroll\">1-9</a></li>
{% set alphas = range('A', 'Z') %}
{% for alpha in alphas%}
<li><a class=\"{{ alpha in filter ? '' : 'disabled ' }}smooth-scroll\" href=\"#scroll-{{ alpha|lower }}\">{{ alpha }}</a></li>
{% endfor %}
</ul>
{% set num = false %}
{% for key,brands in brandsSorted %}
<div class=\"brand-list-block\" id=\"scroll-{{ key|lower }}\">
<h2>{{ key }}</h2>
<ul class=\"brand-list\">
{% for brand in brands %}
{% set url = \"/\" ~ locale ~ \"/product/list?category=\" ~ brand.getId() %}
<li class=\"brand-wrap\">
<div class=\"logo\" title=\"{{ brand.getAlcoholType() }}\">
<div class=\"logo-wrap\">
<a class=\"brand-link\" href=\"{{ url }}\" title=\"{{ brand.getAlcoholType() }}\">
{% if brand.getTypeImage() %}
{{ brand.getTypeImage().getThumbnail('brand').html|raw }}
<h2 class=\"category-color\">{{ brand.getAlcoholType() }}</h2>
{% else %}
<h2>{{ brand.getAlcoholType() }}</h2>
{% endif %}
</a>
</div>
</div>
</li>
{% endfor %}
</ul>
</div>
{% endfor %}
</div>
</div>
</main>
{% endblock %}
", "Shop/brandList.html.twig", "/var/www/vhosts/centricdxb.com/pim2.centricdxb.com/templates/Shop/brandList.html.twig");
}
public function checkSecurity()
{
static $tags = array("include" => 15, "set" => 21, "for" => 22, "if" => 23);
static $filters = array("escape" => 33, "lower" => 33, "raw" => 48);
static $functions = array("range" => 22);
try {
$this->sandbox->checkSecurity(
['include', 'set', 'for', 'if'],
['escape', 'lower', 'raw'],
['range']
);
} 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;
}
}
}