<?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/modules/slideshow/block.html.twig */
class __TwigTemplate_1c16ebae0dec6e4bd3314981f2306fa9 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/modules/slideshow/block.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/modules/slideshow/block.html.twig"));
// line 1
yield "<div class=\"module module-slideshow\">
";
// line 2
if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 3
yield " <div class=\"admin-tools\">
<a href=\"";
// line 4
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_modulecarousel_edit", ["hookId" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 4, $this->source); })()), "id", [], "any", false, false, false, 4)]), "html", null, true);
yield "\" class=\"admin-update\" target=\"_blank\">modifier</a>
</div>
";
}
// line 7
yield " <div class=\"ctn\">
<ul class=\"slideshow\">
";
// line 9
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 9, $this->source); })()), "data", [], "any", false, false, false, 9), "items", [], "any", false, false, false, 9));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 10
yield " ";
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["item"], "matchPriceContext", [CoreExtension::getAttribute($this->env, $this->source, (isset($context["customerMgr"]) || array_key_exists("customerMgr", $context) ? $context["customerMgr"] : (function () { throw new RuntimeError('Variable "customerMgr" does not exist.', 10, $this->source); })()), "getPriceContext", [], "method", false, false, false, 10)], "method", false, false, false, 10)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 11
yield " ";
if (((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 11, $this->source); })()), "request", [], "any", false, false, false, 11), "getLocale", [], "method", false, false, false, 11) == "fr") && CoreExtension::getAttribute($this->env, $this->source, $context["item"], "imgFr", [], "any", false, false, false, 11))) {
// line 12
yield " <li><a href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "getUrlFr", [], "method", false, false, false, 12), "html", null, true);
yield "\"><img src=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "imgFr", [], "any", false, false, false, 12)), "html", null, true);
yield "\" alt=\"\"></a></li>
";
} elseif (((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, // line 13
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 13, $this->source); })()), "request", [], "any", false, false, false, 13), "getLocale", [], "method", false, false, false, 13) == "en") && CoreExtension::getAttribute($this->env, $this->source, $context["item"], "imgEn", [], "any", false, false, false, 13))) {
// line 14
yield " <li><a href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "getUrlEn", [], "method", false, false, false, 14), "html", null, true);
yield "\"><img src=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "imgEn", [], "any", false, false, false, 14)), "html", null, true);
yield "\" alt=\"\"></a></li>
";
}
// line 16
yield " ";
}
// line 17
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['item'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 18
yield " </ul>
</div>
</div>";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "front/modules/slideshow/block.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 102 => 18, 96 => 17, 93 => 16, 85 => 14, 83 => 13, 76 => 12, 73 => 11, 70 => 10, 66 => 9, 62 => 7, 56 => 4, 53 => 3, 51 => 2, 48 => 1,);
}
public function getSourceContext(): Source
{
return new Source("<div class=\"module module-slideshow\">
{% if is_granted(\x27ROLE_ADMIN\x27) %}
<div class=\"admin-tools\">
<a href=\"{{ path(\x27admin_modulecarousel_edit\x27,{hookId:module.id}) }}\" class=\"admin-update\" target=\"_blank\">modifier</a>
</div>
{% endif %}
<div class=\"ctn\">
<ul class=\"slideshow\">
{% for item in module.data.items %}
{% if item.matchPriceContext(customerMgr.getPriceContext()) %}
{% if (app.request.getLocale() == \x27fr\x27) and item.imgFr %}
<li><a href=\"{{ item.getUrlFr() }}\"><img src=\"{{ asset(item.imgFr) }}\" alt=\"\"></a></li>
{% elseif (app.request.getLocale() == \x27en\x27) and item.imgEn %}
<li><a href=\"{{ item.getUrlEn() }}\"><img src=\"{{ asset(item.imgEn) }}\" alt=\"\"></a></li>
{% endif %}
{% endif %}
{% endfor %}
</ul>
</div>
</div>", "front/modules/slideshow/block.html.twig", "/var/www/dogcat.com/v2-test/templates/front/modules/slideshow/block.html.twig");
}
}