<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
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;
use Twig\TemplateWrapper;
/* front/catalog/product/carousel.html.twig */
class __TwigTemplate_3c4682575ea00f0a0ee9d04815a2249a extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $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 = []): iterable
{
$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", "front/catalog/product/carousel.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/catalog/product/carousel.html.twig"));
// line 1
if ((($tmp = !array_key_exists("withWrapper", $context)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 2
yield " ";
$context["withWrapper"] = false;
}
// line 4
if ((($tmp = !array_key_exists("titleTag", $context)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 5
yield " ";
$context["titleTag"] = "div";
}
// line 7
if ((($tmp = (isset($context["withWrapper"]) || array_key_exists("withWrapper", $context) ? $context["withWrapper"] : (function () { throw new RuntimeError('Variable "withWrapper" does not exist.', 7, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 8
yield "<div class=\"product-carousel-ctn\">
<div class=\"ctn\">
";
}
// line 11
yield "<div class=\"product-list-ctn\">
";
// line 12
if ((array_key_exists("title", $context) && (isset($context["title"]) || array_key_exists("title", $context) ? $context["title"] : (function () { throw new RuntimeError('Variable "title" does not exist.', 12, $this->source); })()))) {
// line 13
yield " <div class=\"title-ctn\">
<";
// line 14
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["titleTag"]) || array_key_exists("titleTag", $context) ? $context["titleTag"] : (function () { throw new RuntimeError('Variable "titleTag" does not exist.', 14, $this->source); })()), "html", null, true);
yield " class=\"title\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["title"]) || array_key_exists("title", $context) ? $context["title"] : (function () { throw new RuntimeError('Variable "title" does not exist.', 14, $this->source); })()), "html", null, true);
yield "</";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["titleTag"]) || array_key_exists("titleTag", $context) ? $context["titleTag"] : (function () { throw new RuntimeError('Variable "titleTag" does not exist.', 14, $this->source); })()), "html", null, true);
yield ">
<hr>
</div>
";
}
// line 18
yield " <ul class=\"product-list product-carousel\">
";
// line 19
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 19, $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["_key"] => $context["p"]) {
// line 20
yield " ";
yield from $this->load("front/catalog/product/view/list-item.html.twig", 20)->unwrap()->yield(CoreExtension::merge($context, ["product" => $context["p"]]));
// line 21
yield " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['p'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 22
yield " </ul>
</div>
";
// line 24
if ((($tmp = (isset($context["withWrapper"]) || array_key_exists("withWrapper", $context) ? $context["withWrapper"] : (function () { throw new RuntimeError('Variable "withWrapper" does not exist.', 24, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 25
yield " </div>
</div>
";
}
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "front/catalog/product/carousel.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 129 => 25, 127 => 24, 123 => 22, 109 => 21, 106 => 20, 89 => 19, 86 => 18, 75 => 14, 72 => 13, 70 => 12, 67 => 11, 62 => 8, 60 => 7, 56 => 5, 54 => 4, 50 => 2, 48 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% if withWrapper is not defined %}
{% set withWrapper = false %}
{% endif %}
{% if titleTag is not defined %}
{% set titleTag = 'div' %}
{% endif %}
{% if withWrapper %}
<div class=\"product-carousel-ctn\">
<div class=\"ctn\">
{% endif %}
<div class=\"product-list-ctn\">
{% if title is defined and title %}
<div class=\"title-ctn\">
<{{ titleTag }} class=\"title\">{{ title }}</{{ titleTag }}>
<hr>
</div>
{% endif %}
<ul class=\"product-list product-carousel\">
{% for p in products %}
{% include 'front/catalog/product/view/list-item.html.twig' with {product:p} %}
{% endfor %}
</ul>
</div>
{% if withWrapper %}
</div>
</div>
{% endif %}", "front/catalog/product/carousel.html.twig", "/var/www/dogcat.com/v2-test/templates/front/catalog/product/carousel.html.twig");
}
}