<?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/course/course-section.html.twig */
class __TwigTemplate_1574277b31f8c99218ac5d96d1bf584058834fa86d210a04bb1bed60283de658 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/course/course-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/course/course-section.html.twig"));
// line 1
if ((1 === twig_compare(twig_length_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.', 1, $this->source); })()), "items", [], "any", false, false, false, 1)), 0))) {
// line 2
echo " <section 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.', 2, $this->source); })()), "name", [], "any", false, false, false, 2), "html", null, true);
echo "\" class=\"pag-sec slider-destaques\">
<div id=\"container-";
// line 3
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.', 3, $this->source); })()), "name", [], "any", false, false, false, 3), "html", null, true);
echo "\" class=\"container product-section-container\" data-status=\"hide\">
<div class=\"lateral-products\">
<div class=\"related-contain\">
<header class=\"tit-sec tx-centro\">
<h2>";
// line 7
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.', 7, $this->source); })()), "title", [], "any", false, false, false, 7), "html", null, true);
echo "</h2>
<span class=\"sub\">";
// line 8
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.', 8, $this->source); })()), "subtitle", [], "any", false, false, false, 8), "html", null, true);
echo "</span>
</header>
<div id=\"courses-container\" class=\"related-boxes\" data-status=\"hide\">
";
// line 11
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(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); })()), "items", [], "any", false, false, false, 11));
$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["i"] => $context["item"]) {
// line 12
echo " ";
if ((twig_get_attribute($this->env, $this->source, ($context["section"] ?? null), "isCourse", [], "any", true, true, false, 12) && 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.', 12, $this->source); })()), "isCourse", [], "any", false, false, false, 12))) {
// line 13
echo " ";
$context["n"] = ($context["i"] + 1);
// line 14
echo " ";
$this->loadTemplate("website/course/course-item-box.html.twig", "website/course/course-section.html.twig", 14)->display($context);
// line 15
echo " ";
}
// line 16
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['i'], $context['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 17
echo " </div>";
// line 18
echo "
";
// line 19
if ((1 === twig_compare(twig_length_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.', 19, $this->source); })()), "items", [], "any", false, false, false, 19)), 3))) {
// line 20
echo " <button id=\"btn-see-courses\" class=\"btn-ver\">
<span class=\"txt-show\">";
// line 21
echo twig_escape_filter($this->env, $this->extensions['EADPlataforma\Twig\FunctionsExtension']->getLanguage("see_more", "product"), "html", null, true);
echo "</span>
<span class=\"txt-hide\">";
// line 22
echo twig_escape_filter($this->env, $this->extensions['EADPlataforma\Twig\FunctionsExtension']->getLanguage("see_less", "product"), "html", null, true);
echo "</span>
</button>
";
}
// line 25
echo " </div>";
// line 26
echo " </div>";
// line 27
echo " </div>";
// line 28
echo " </section>
";
}
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "website/course/course-section.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 136 => 28, 134 => 27, 132 => 26, 130 => 25, 124 => 22, 120 => 21, 117 => 20, 115 => 19, 112 => 18, 110 => 17, 96 => 16, 93 => 15, 90 => 14, 87 => 13, 84 => 12, 67 => 11, 61 => 8, 57 => 7, 50 => 3, 45 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% if section.items|length > 0 %}
<section id=\"sec-content-{{ section.name }}\" class=\"pag-sec slider-destaques\">
<div id=\"container-{{ section.name }}\" class=\"container product-section-container\" data-status=\"hide\">
<div class=\"lateral-products\">
<div class=\"related-contain\">
<header class=\"tit-sec tx-centro\">
<h2>{{ section.title }}</h2>
<span class=\"sub\">{{ section.subtitle }}</span>
</header>
<div id=\"courses-container\" class=\"related-boxes\" data-status=\"hide\">
{% for i, item in section.items %}
{% if section.isCourse is defined and section.isCourse %}
{% set n = i + 1 %}
{% include 'website/course/course-item-box.html.twig' %}
{% endif %}
{% endfor %}
</div>{# -/ .related-boxes #}
{% if section.items|length > 3 %}
<button id=\"btn-see-courses\" class=\"btn-ver\">
<span class=\"txt-show\">{{ getLanguage('see_more', 'product') }}</span>
<span class=\"txt-hide\">{{ getLanguage('see_less', 'product') }}</span>
</button>
{% endif %}
</div>{# -/ .related-contain #}
</div>{# -/ .lateral-products #}
</div>{# -/ .product-section-container #}
</section>
{% endif %}
", "website/course/course-section.html.twig", "/var/www/html/templates/website/course/course-section.html.twig");
}
}