<?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/home/section.html.twig */
class __TwigTemplate_1a9dee0b8fd7956b2adb1224ebc47b1fd33035acecd8deb8fe2a7232fb8ec28e 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/home/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/home/section.html.twig"));
// line 1
$macros["__internal_84f63695ec253397858c3345eae212def1dd7a8e297a23a99d4742682a833512"] = $this->macros["__internal_84f63695ec253397858c3345eae212def1dd7a8e297a23a99d4742682a833512"] = $this->loadTemplate("utils.html.twig", "website/home/section.html.twig", 1)->unwrap();
// line 2
echo "
";
// line 3
$context["items"] = $this->extensions['EADPlataforma\Twig\FunctionsExtension']->pageSectionItems((isset($context["section"]) || array_key_exists("section", $context) ? $context["section"] : (function () { throw new RuntimeError('Variable "section" does not exist.', 3, $this->source); })()));
// line 4
$context["itemTemplate"] = $this->extensions['EADPlataforma\Twig\FunctionsExtension']->pageSectionTemplateItem((isset($context["section"]) || array_key_exists("section", $context) ? $context["section"] : (function () { throw new RuntimeError('Variable "section" does not exist.', 4, $this->source); })()));
// line 5
$context["background"] = (((0 === twig_compare(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), $this->extensions['EADPlataforma\Twig\FunctionsExtension']->enum("PageSectionEnum::YES")))) ? ("sec-bg-alt") : (null));
// line 6
$context["format"] = $this->extensions['EADPlataforma\Twig\FunctionsExtension']->pageSectionFormat(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.', 6, $this->source); })()), "type", [], "any", false, false, false, 6));
// line 7
$context["positionItem"] = $this->extensions['EADPlataforma\Twig\FunctionsExtension']->pageSectionPosition(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.', 7, $this->source); })()), "positionItem", [], "any", false, false, false, 7));
// line 8
$context["positionText"] = $this->extensions['EADPlataforma\Twig\FunctionsExtension']->pageSectionPosition(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.', 8, $this->source); })()), "positionText", [], "any", false, false, false, 8));
// line 9
$context["perLine"] = (((1 === twig_compare(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.', 9, $this->source); })()), "numberPerline", [], "any", false, false, false, 9), twig_length_filter($this->env, (isset($context["items"]) || array_key_exists("items", $context) ? $context["items"] : (function () { throw new RuntimeError('Variable "items" does not exist.', 9, $this->source); })()))))) ? (twig_length_filter($this->env, (isset($context["items"]) || array_key_exists("items", $context) ? $context["items"] : (function () { throw new RuntimeError('Variable "items" does not exist.', 9, $this->source); })()))) : (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.', 9, $this->source); })()), "numberPerline", [], "any", false, false, false, 9)));
// line 10
$context["ofLines"] = 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.', 10, $this->source); })()), "numberOfline", [], "any", false, false, false, 10);
// line 11
$context["slider"] = (((0 === twig_compare(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.', 11, $this->source); })()), "slider", [], "any", false, false, false, 11), $this->extensions['EADPlataforma\Twig\FunctionsExtension']->enum("PageSectionEnum::YES")))) ? (true) : (false));
// line 12
$context["showAll"] = $this->extensions['EADPlataforma\Twig\FunctionsExtension']->pageSectionShowAll((isset($context["section"]) || array_key_exists("section", $context) ? $context["section"] : (function () { throw new RuntimeError('Variable "section" does not exist.', 12, $this->source); })()));
// line 13
$context["linkAll"] = $this->extensions['EADPlataforma\Twig\FunctionsExtension']->pageSectionLinkAll((isset($context["section"]) || array_key_exists("section", $context) ? $context["section"] : (function () { throw new RuntimeError('Variable "section" does not exist.', 13, $this->source); })()));
// line 14
echo "
";
// line 15
$context["sectionClasses"] = twig_array_filter($this->env, [0 => "pag-sec", 1 => ("sec-" . // line 17
(isset($context["format"]) || array_key_exists("format", $context) ? $context["format"] : (function () { throw new RuntimeError('Variable "format" does not exist.', 17, $this->source); })())), 2 => // line 18
(isset($context["background"]) || array_key_exists("background", $context) ? $context["background"] : (function () { throw new RuntimeError('Variable "background" does not exist.', 18, $this->source); })()), 3 => (( // line 19
(isset($context["slider"]) || array_key_exists("slider", $context) ? $context["slider"] : (function () { throw new RuntimeError('Variable "slider" does not exist.', 19, $this->source); })())) ? ("slider slider-destaques") : (null)), 4 => ("sec-items-" . // line 20
(isset($context["positionItem"]) || array_key_exists("positionItem", $context) ? $context["positionItem"] : (function () { throw new RuntimeError('Variable "positionItem" does not exist.', 20, $this->source); })())), 5 => ("sec-text-" . // line 21
(isset($context["positionText"]) || array_key_exists("positionText", $context) ? $context["positionText"] : (function () { throw new RuntimeError('Variable "positionText" does not exist.', 21, $this->source); })()))], // line 22
function ($__class__) use ($context, $macros) { $context["class"] = $__class__; return !twig_test_empty((isset($context["class"]) || array_key_exists("class", $context) ? $context["class"] : (function () { throw new RuntimeError('Variable "class" does not exist.', 22, $this->source); })())); });
// line 24
echo "
";
// line 25
if ((1 === twig_compare(twig_length_filter($this->env, (isset($context["items"]) || array_key_exists("items", $context) ? $context["items"] : (function () { throw new RuntimeError('Variable "items" does not exist.', 25, $this->source); })())), 0))) {
// line 26
echo " <section class=\"";
echo twig_escape_filter($this->env, twig_trim_filter(twig_join_filter((isset($context["sectionClasses"]) || array_key_exists("sectionClasses", $context) ? $context["sectionClasses"] : (function () { throw new RuntimeError('Variable "sectionClasses" does not exist.', 26, $this->source); })()), " ")), "html", null, true);
echo "\" id=\"sec-content-";
echo twig_escape_filter($this->env, 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.', 26, $this->source); })()), "id", [], "any", false, false, false, 26), "html", null, true);
echo "\">
<div id=\"container-";
// line 27
echo twig_escape_filter($this->env, 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.', 27, $this->source); })()), "id", [], "any", false, false, false, 27), "html", null, true);
echo "\" class=\"";
echo (( !((isset($context["format"]) || array_key_exists("format", $context) ? $context["format"] : (function () { throw new RuntimeError('Variable "format" does not exist.', 27, $this->source); })()) === "expand")) ? ("container-boxes") : ("container"));
echo "\">
<header class=\"tit-sec\">
<h2>";
// line 29
echo twig_escape_filter($this->env, 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.', 29, $this->source); })()), "title", [], "any", false, false, false, 29), "html", null, true);
echo "</h2>
<span class=\"sub\">";
// line 30
echo twig_escape_filter($this->env, 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.', 30, $this->source); })()), "subtitle", [], "any", false, false, false, 30), "html", null, true);
echo "</span>
</header>
";
// line 34
echo " <div class=\"items-section items-";
echo twig_escape_filter($this->env, (isset($context["format"]) || array_key_exists("format", $context) ? $context["format"] : (function () { throw new RuntimeError('Variable "format" does not exist.', 34, $this->source); })()), "html", null, true);
(( !((isset($context["format"]) || array_key_exists("format", $context) ? $context["format"] : (function () { throw new RuntimeError('Variable "format" does not exist.', 34, $this->source); })()) === "expand")) ? (print (twig_escape_filter($this->env, (" items-line-" . (isset($context["perLine"]) || array_key_exists("perLine", $context) ? $context["perLine"] : (function () { throw new RuntimeError('Variable "perLine" does not exist.', 34, $this->source); })())), "html", null, true))) : (print ("")));
echo "\">
";
// line 36
if ((isset($context["slider"]) || array_key_exists("slider", $context) ? $context["slider"] : (function () { throw new RuntimeError('Variable "slider" does not exist.', 36, $this->source); })())) {
// line 37
echo " ";
// line 38
echo " <div id=\"arrows-slider-";
echo twig_escape_filter($this->env, 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.', 38, $this->source); })()), "id", [], "any", false, false, false, 38), "html", null, true);
echo "\" class=\"tns-arrows\">
<button class=\"slider-seta slider-seta-prev\">";
// line 39
echo twig_call_macro($macros["__internal_84f63695ec253397858c3345eae212def1dd7a8e297a23a99d4742682a833512"], "macro_ico", ["arrow-left"], 39, $context, $this->getSourceContext());
echo "</button>
<button class=\"slider-seta slider-seta-next\">";
// line 40
echo twig_call_macro($macros["__internal_84f63695ec253397858c3345eae212def1dd7a8e297a23a99d4742682a833512"], "macro_ico", ["arrow-right"], 40, $context, $this->getSourceContext());
echo "</button>
</div>
";
}
// line 43
echo "
";
// line 45
echo " <div
";
// line 46
if ((isset($context["slider"]) || array_key_exists("slider", $context) ? $context["slider"] : (function () { throw new RuntimeError('Variable "slider" does not exist.', 46, $this->source); })())) {
// line 47
echo " id=\"slider-";
echo twig_escape_filter($this->env, 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.', 47, $this->source); })()), "id", [], "any", false, false, false, 47), "html", null, true);
echo "\" class=\"js--slider\" data-slider-items=\"";
echo twig_escape_filter($this->env, (isset($context["perLine"]) || array_key_exists("perLine", $context) ? $context["perLine"] : (function () { throw new RuntimeError('Variable "perLine" does not exist.', 47, $this->source); })()), "html", null, true);
echo "\"
data-slider-options-label=\"slider-";
// line 48
echo twig_escape_filter($this->env, (isset($context["format"]) || array_key_exists("format", $context) ? $context["format"] : (function () { throw new RuntimeError('Variable "format" does not exist.', 48, $this->source); })()), "html", null, true);
echo "\"
";
} else {
// line 50
echo " class=\"products-list-";
echo twig_escape_filter($this->env, (isset($context["format"]) || array_key_exists("format", $context) ? $context["format"] : (function () { throw new RuntimeError('Variable "format" does not exist.', 50, $this->source); })()), "html", null, true);
echo "\"
";
}
// line 51
echo ">
";
// line 52
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["items"]) || array_key_exists("items", $context) ? $context["items"] : (function () { throw new RuntimeError('Variable "items" does not exist.', 52, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["ind"] => $context["item"]) {
// line 53
echo " ";
$this->loadTemplate((isset($context["itemTemplate"]) || array_key_exists("itemTemplate", $context) ? $context["itemTemplate"] : (function () { throw new RuntimeError('Variable "itemTemplate" does not exist.', 53, $this->source); })()), "website/home/section.html.twig", 53)->display(twig_array_merge($context, ["item" => $context["item"], "format" => (isset($context["format"]) || array_key_exists("format", $context) ? $context["format"] : (function () { throw new RuntimeError('Variable "format" does not exist.', 53, $this->source); })()), "ind" => ($context["ind"] + 1)]));
// line 54
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['ind'], $context['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 55
echo "
";
// line 57
echo " ";
if (((isset($context["showAll"]) || array_key_exists("showAll", $context) ? $context["showAll"] : (function () { throw new RuntimeError('Variable "showAll" does not exist.', 57, $this->source); })()) && (isset($context["slider"]) || array_key_exists("slider", $context) ? $context["slider"] : (function () { throw new RuntimeError('Variable "slider" does not exist.', 57, $this->source); })()))) {
// line 58
echo " <div class=\"sec--";
echo twig_escape_filter($this->env, (isset($context["format"]) || array_key_exists("format", $context) ? $context["format"] : (function () { throw new RuntimeError('Variable "format" does not exist.', 58, $this->source); })()), "html", null, true);
echo "\">
<div class=\"";
// line 59
echo (( !((isset($context["format"]) || array_key_exists("format", $context) ? $context["format"] : (function () { throw new RuntimeError('Variable "format" does not exist.', 59, $this->source); })()) === "default")) ? ("item") : ("item-curso"));
echo "\">
<a class=\"link-all\" href=\"";
// line 60
echo twig_escape_filter($this->env, (isset($context["linkAll"]) || array_key_exists("linkAll", $context) ? $context["linkAll"] : (function () { throw new RuntimeError('Variable "linkAll" does not exist.', 60, $this->source); })()), "html", null, true);
echo "\">
";
// line 61
echo twig_escape_filter($this->env, $this->extensions['EADPlataforma\Twig\FunctionsExtension']->getLanguage("see_all", "product"), "html", null, true);
// line 62
echo " ";
echo twig_call_macro($macros["__internal_84f63695ec253397858c3345eae212def1dd7a8e297a23a99d4742682a833512"], "macro_ico", ["arrow-right"], 62, $context, $this->getSourceContext());
// line 63
echo "
</a>
</div>
</div>
";
}
// line 68
echo " </div>
</div>
";
// line 72
echo " ";
if (((isset($context["showAll"]) || array_key_exists("showAll", $context) ? $context["showAll"] : (function () { throw new RuntimeError('Variable "showAll" does not exist.', 72, $this->source); })()) && !(isset($context["slider"]) || array_key_exists("slider", $context) ? $context["slider"] : (function () { throw new RuntimeError('Variable "slider" does not exist.', 72, $this->source); })()))) {
// line 73
echo " <div class=\"btn-box btn-box-home\">
<a id=\"btn-product-section\" class=\"btn-ver\" href=\"";
// line 74
echo twig_escape_filter($this->env, (isset($context["linkAll"]) || array_key_exists("linkAll", $context) ? $context["linkAll"] : (function () { throw new RuntimeError('Variable "linkAll" does not exist.', 74, $this->source); })()), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['EADPlataforma\Twig\FunctionsExtension']->getLanguage("see_all", "product"), "html", null, true);
echo "</a>
</div>
";
}
// line 77
echo " </div>
</section>
";
}
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "website/home/section.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 249 => 77, 241 => 74, 238 => 73, 235 => 72, 230 => 68, 223 => 63, 220 => 62, 218 => 61, 214 => 60, 210 => 59, 205 => 58, 202 => 57, 199 => 55, 185 => 54, 182 => 53, 165 => 52, 162 => 51, 156 => 50, 151 => 48, 144 => 47, 142 => 46, 139 => 45, 136 => 43, 130 => 40, 126 => 39, 121 => 38, 119 => 37, 117 => 36, 110 => 34, 104 => 30, 100 => 29, 93 => 27, 86 => 26, 84 => 25, 81 => 24, 79 => 22, 78 => 21, 77 => 20, 76 => 19, 75 => 18, 74 => 17, 73 => 15, 70 => 14, 68 => 13, 66 => 12, 64 => 11, 62 => 10, 60 => 9, 58 => 8, 56 => 7, 54 => 6, 52 => 5, 50 => 4, 48 => 3, 45 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% from 'utils.html.twig' import ico %}
{% set items = pageSectionItems(section) %}
{% set itemTemplate = pageSectionTemplateItem(section) %}
{% set background = section.background == enum('PageSectionEnum::YES') ? 'sec-bg-alt' : null %}
{% set format = pageSectionFormat(section.type) %}
{% set positionItem = pageSectionPosition(section.positionItem) %}
{% set positionText = pageSectionPosition(section.positionText) %}
{% set perLine = (section.numberPerline > items|length)? items|length : section.numberPerline %}
{% set ofLines = section.numberOfline %}
{% set slider = section.slider == enum('PageSectionEnum::YES') ? true : false %}
{% set showAll = pageSectionShowAll(section) %}
{% set linkAll = pageSectionLinkAll(section) %}
{% set sectionClasses = [
'pag-sec',
\"sec-#{format}\",
background,
(slider? 'slider slider-destaques':null),
\"sec-items-#{positionItem}\",
\"sec-text-#{positionText}\"
]|filter(class=> class is not empty)
%}
{% if items|length > 0 %}
<section class=\"{{ sectionClasses|join(' ')|trim }}\" id=\"sec-content-{{ section.id }}\">
<div id=\"container-{{ section.id }}\" class=\"{{ format is not same as('expand')? 'container-boxes' : 'container' }}\">
<header class=\"tit-sec\">
<h2>{{ section.title }}</h2>
<span class=\"sub\">{{ section.subtitle }}</span>
</header>
{# BOXES | SLIDER #}
<div class=\"items-section items-{{ format }}{{ format is not same as('expand')? \" items-line-#{perLine}\" }}\">
{% if slider %}
{# SLIDER ARROWS #}
<div id=\"arrows-slider-{{ section.id }}\" class=\"tns-arrows\">
<button class=\"slider-seta slider-seta-prev\">{{ ico('arrow-left') }}</button>
<button class=\"slider-seta slider-seta-next\">{{ ico('arrow-right') }}</button>
</div>
{% endif %}
{# SLIDER ITEMS #}
<div
{% if slider %}
id=\"slider-{{ section.id }}\" class=\"js--slider\" data-slider-items=\"{{ perLine }}\"
data-slider-options-label=\"slider-{{ format }}\"
{% else %}
class=\"products-list-{{ format }}\"
{% endif %}>
{% for ind, item in items %}
{% include itemTemplate with { item: item, format: format, ind: ind+1 }%}
{% endfor %}
{# SHOW MORE #}
{% if showAll and slider %}
<div class=\"sec--{{ format }}\">
<div class=\"{{ format is not same as('default')? \"item\":\"item-curso\" }}\">
<a class=\"link-all\" href=\"{{ linkAll }}\">
{{
getLanguage('see_all', 'product') }} {{ ico('arrow-right')
}}
</a>
</div>
</div>
{% endif %}
</div>
</div>
{# SHOW MORE #}
{% if showAll and not slider %}
<div class=\"btn-box btn-box-home\">
<a id=\"btn-product-section\" class=\"btn-ver\" href=\"{{ linkAll }}\">{{ getLanguage('see_all', 'product') }}</a>
</div>
{% endif %}
</div>
</section>
{% endif %}
", "website/home/section.html.twig", "/var/www/html/templates/website/home/section.html.twig");
}
}