<?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;
/* website/product/product-category-section.html.twig */
class __TwigTemplate_85b2bf8789cff92098c9dcfb965f8968f30fc07fcbb4f36e0d4d2108ca200cd5 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "website/product/product-category-section.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "website/product/product-category-section.html.twig"));
// line 1
$macros["__internal_84ec053fdd118f4a7b405a006a03f7de1c344fc7699137858777c9d7c79ba885"] = $this->macros["__internal_84ec053fdd118f4a7b405a006a03f7de1c344fc7699137858777c9d7c79ba885"] = $this->loadTemplate("utils.html.twig", "website/product/product-category-section.html.twig", 1)->unwrap();
// line 2
if ((1 === twig_compare(twig_length_filter($this->env, (isset($context["productCategories"]) || array_key_exists("productCategories", $context) ? $context["productCategories"] : (function () { throw new RuntimeError('Variable "productCategories" does not exist.', 2, $this->source); })())), 0))) {
// line 3
echo "\t";
$context["visibles"] = 10;
// line 4
echo "\t<section
\t\tclass=\"pag-sec ";
// line 5
if ((array_key_exists("section", $context) && twig_get_attribute($this->env, $this->source, (isset($context["section"]) || array_key_exists("section", $context) ? $context["section"] : (function () { throw new RuntimeError('Variable "section" does not exist.', 5, $this->source); })()), "background", [], "any", false, false, false, 5))) {
echo " sec-bg-alt ";
}
echo "\">
\t <div id=\"categories-container\" class=\"container\" data-status=\"principal\">
\t <header class=\"tit-sec tx-centro\">
\t <h2>";
// line 8
echo twig_escape_filter($this->env, $this->extensions['EADPlataforma\Twig\FunctionsExtension']->getLanguage("main_categories", "home"), "html", null, true);
echo "</h2>
\t </header>
\t <div class=\"nuvem-tags\">
\t \t";
// line 11
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["productCategories"]) || array_key_exists("productCategories", $context) ? $context["productCategories"] : (function () { throw new RuntimeError('Variable "productCategories" does not exist.', 11, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["productCategory"]) {
// line 12
echo "\t \t\t<a href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("productListCategory", ["type" => "produtos", "slug" => twig_get_attribute($this->env, $this->source, $context["productCategory"], "slug", [], "any", false, false, false, 12)]), "html", null, true);
echo "\" class=\"tag";
echo ((twig_get_attribute($this->env, $this->source, $context["productCategory"], "icon", [], "any", false, false, false, 12)) ? (" icon") : (" txt"));
echo "\">
\t \t\t\t";
// line 13
if (twig_get_attribute($this->env, $this->source, $context["productCategory"], "icon", [], "any", false, false, false, 13)) {
// line 14
echo "\t \t\t\t\t";
echo twig_call_macro($macros["__internal_84ec053fdd118f4a7b405a006a03f7de1c344fc7699137858777c9d7c79ba885"], "macro_imgUpload", [twig_get_attribute($this->env, $this->source, $context["productCategory"], "icon", [], "any", false, false, false, 14), $this->extensions['EADPlataforma\Twig\FunctionsExtension']->enum("AbstractEnum::PATH_OTHERS"), "category-icon", twig_get_attribute($this->env, $this->source, $context["productCategory"], "category", [], "any", false, false, false, 14)], 14, $context, $this->getSourceContext());
echo "
\t \t\t\t";
}
// line 16
echo "\t \t\t\t";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["productCategory"], "category", [], "any", false, false, false, 16), "html", null, true);
echo "
\t \t\t</a>
\t ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['productCategory'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 19
echo "\t </div>
\t <footer>
\t \t";
// line 21
if ((1 === twig_compare(twig_length_filter($this->env, (isset($context["productCategories"]) || array_key_exists("productCategories", $context) ? $context["productCategories"] : (function () { throw new RuntimeError('Variable "productCategories" does not exist.', 21, $this->source); })())), (isset($context["visibles"]) || array_key_exists("visibles", $context) ? $context["visibles"] : (function () { throw new RuntimeError('Variable "visibles" does not exist.', 21, $this->source); })())))) {
// line 22
echo "\t\t \t<button id=\"btn-categories\" class=\"btn-ver\">
\t\t \t\t<span class=\"txt-show\">";
// line 23
echo twig_escape_filter($this->env, $this->extensions['EADPlataforma\Twig\FunctionsExtension']->getLanguage("see_all", "home"), "html", null, true);
echo "</span>
\t\t \t\t<span class=\"txt-hide\">";
// line 24
echo twig_escape_filter($this->env, $this->extensions['EADPlataforma\Twig\FunctionsExtension']->getLanguage("see_main", "home"), "html", null, true);
echo "</span>
\t\t \t</button>
\t \t";
}
// line 27
echo "\t </footer>
\t </div>
\t</section>
";
}
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "website/product/product-category-section.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 115 => 27, 109 => 24, 105 => 23, 102 => 22, 100 => 21, 96 => 19, 86 => 16, 80 => 14, 78 => 13, 71 => 12, 67 => 11, 61 => 8, 53 => 5, 50 => 4, 47 => 3, 45 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% from 'utils.html.twig' import imgUpload %}
{% if productCategories|length > 0 %}
\t{% set visibles = 10 %}
\t<section
\t\tclass=\"pag-sec {% if section is defined and section.background %} sec-bg-alt {% endif %}\">
\t <div id=\"categories-container\" class=\"container\" data-status=\"principal\">
\t <header class=\"tit-sec tx-centro\">
\t <h2>{{ getLanguage('main_categories', 'home') }}</h2>
\t </header>
\t <div class=\"nuvem-tags\">
\t \t{% for productCategory in productCategories %}
\t \t\t<a href=\"{{ path('productListCategory', { type: 'produtos', slug: productCategory.slug }) }}\" class=\"tag{{ (productCategory.icon)? ' icon' : ' txt' }}\">
\t \t\t\t{% if productCategory.icon %}
\t \t\t\t\t{{ imgUpload(productCategory.icon, enum('AbstractEnum::PATH_OTHERS'), 'category-icon', productCategory.category) }}
\t \t\t\t{% endif %}
\t \t\t\t{{ productCategory.category }}
\t \t\t</a>
\t {% endfor %}
\t </div>
\t <footer>
\t \t{% if productCategories|length > visibles %}
\t\t \t<button id=\"btn-categories\" class=\"btn-ver\">
\t\t \t\t<span class=\"txt-show\">{{ getLanguage('see_all', 'home') }}</span>
\t\t \t\t<span class=\"txt-hide\">{{ getLanguage('see_main', 'home') }}</span>
\t\t \t</button>
\t \t{% endif %}
\t </footer>
\t </div>
\t</section>
{% endif %}", "website/product/product-category-section.html.twig", "/var/www/html/templates/website/product/product-category-section.html.twig");
}
}