<?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;
/* front/modules/featured/block.html.twig */
class __TwigTemplate_77d2bd6615207b6cdc8b10729c1ed937 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_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/modules/featured/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/featured/block.html.twig"));
// line 1
if (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.', 1, $this->source); })()), "data", [], "any", false, false, false, 1), "products", [], "any", false, false, false, 1)) {
// line 2
yield " ";
$context["title"] = 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.', 2, $this->source); })()), "data", [], "any", false, false, false, 2), "titleFr", [], "any", false, false, false, 2);
// line 3
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.', 3, $this->source); })()), "request", [], "any", false, false, false, 3), "getLocale", [], "method", false, false, false, 3) == "en") && 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.', 3, $this->source); })()), "data", [], "any", false, false, false, 3), "titleEn", [], "any", false, false, false, 3))) {
// line 4
yield " ";
$context["title"] = 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.', 4, $this->source); })()), "data", [], "any", false, false, false, 4), "titleEn", [], "any", false, false, false, 4);
// line 5
yield " ";
}
// line 6
yield " <div class=\"module module-product\">
";
// line 7
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) {
// line 8
yield " <div class=\"admin-tools\">
<a href=\"";
// line 9
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_modulefeatured_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.', 9, $this->source); })()), "id", [], "any", false, false, false, 9)]), "html", null, true);
yield "\" class=\"admin-update\" target=\"_blank\">modifier</a>
</div>
";
}
// line 12
yield " <div class=\"ctn\">
";
// line 13
yield from $this->loadTemplate("front/catalog/product/carousel.html.twig", "front/modules/featured/block.html.twig", 13)->unwrap()->yield(CoreExtension::merge($context, ["products" => 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.', 13, $this->source); })()), "data", [], "any", false, false, false, 13), "products", [], "any", false, false, false, 13), "title" => (isset($context["title"]) || array_key_exists("title", $context) ? $context["title"] : (function () { throw new RuntimeError('Variable "title" does not exist.', 13, $this->source); })()), "productTitleTag" => "h2"]));
// line 14
yield " </div>
</div>
";
}
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "front/modules/featured/block.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 77 => 14, 75 => 13, 72 => 12, 66 => 9, 63 => 8, 61 => 7, 58 => 6, 55 => 5, 52 => 4, 49 => 3, 46 => 2, 44 => 1,);
}
public function getSourceContext()
{
return new Source("{% if module.data.products %}
{% set title = module.data.titleFr %}
{% if (app.request.getLocale() == 'en') and module.data.titleEn %}
{% set title = module.data.titleEn %}
{% endif %}
<div class=\"module module-product\">
{% if is_granted('ROLE_ADMIN') %}
<div class=\"admin-tools\">
<a href=\"{{ path('admin_modulefeatured_edit',{hookId:module.id}) }}\" class=\"admin-update\" target=\"_blank\">modifier</a>
</div>
{% endif %}
<div class=\"ctn\">
{% include 'front/catalog/product/carousel.html.twig' with { products:module.data.products, title:title, productTitleTag:'h2' } %}
</div>
</div>
{% endif %}", "front/modules/featured/block.html.twig", "/var/www/dogcat.com/v2-test/templates/front/modules/featured/block.html.twig");
}
}