var/cache/dev/twig/e7/e701cce9ca3e4b34951570caf236f5bb.php line 68

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* front/modules/slideshow/block.html.twig */
  16. class __TwigTemplate_1c16ebae0dec6e4bd3314981f2306fa9 extends Template
  17. {
  18. private Source $source;
  19. /**
  20. * @var array<string, Template>
  21. */
  22. private array $macros = [];
  23. public function __construct(Environment $env)
  24. {
  25. parent::__construct($env);
  26. $this->source = $this->getSourceContext();
  27. $this->parent = false;
  28. $this->blocks = [
  29. ];
  30. }
  31. protected function doDisplay(array $context, array $blocks = []): iterable
  32. {
  33. $macros = $this->macros;
  34. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  35. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/modules/slideshow/block.html.twig"));
  36. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  37. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/modules/slideshow/block.html.twig"));
  38. // line 1
  39. yield "<div class=\"module module-slideshow\">
  40. ";
  41. // line 2
  42. if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  43. // line 3
  44. yield " <div class=\"admin-tools\">
  45. <a href=\"";
  46. // line 4
  47. 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);
  48. yield "\" class=\"admin-update\" target=\"_blank\">modifier</a>
  49. </div>
  50. ";
  51. }
  52. // line 7
  53. yield " <div class=\"ctn\">
  54. <ul class=\"slideshow\">
  55. ";
  56. // line 9
  57. $context['_parent'] = $context;
  58. $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));
  59. foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  60. // line 10
  61. yield " ";
  62. 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)) {
  63. // line 11
  64. yield " ";
  65. 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))) {
  66. // line 12
  67. yield " <li><a href=\"";
  68. 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);
  69. yield "\"><img src=\"";
  70. 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);
  71. yield "\" alt=\"\"></a></li>
  72. ";
  73. } elseif (((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, // line 13
  74. (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))) {
  75. // line 14
  76. yield " <li><a href=\"";
  77. 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);
  78. yield "\"><img src=\"";
  79. 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);
  80. yield "\" alt=\"\"></a></li>
  81. ";
  82. }
  83. // line 16
  84. yield " ";
  85. }
  86. // line 17
  87. yield " ";
  88. }
  89. $_parent = $context['_parent'];
  90. unset($context['_seq'], $context['_key'], $context['item'], $context['_parent']);
  91. $context = array_intersect_key($context, $_parent) + $_parent;
  92. // line 18
  93. yield " </ul>
  94. </div>
  95. </div>";
  96. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  97. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  98. yield from [];
  99. }
  100. /**
  101. * @codeCoverageIgnore
  102. */
  103. public function getTemplateName(): string
  104. {
  105. return "front/modules/slideshow/block.html.twig";
  106. }
  107. /**
  108. * @codeCoverageIgnore
  109. */
  110. public function isTraitable(): bool
  111. {
  112. return false;
  113. }
  114. /**
  115. * @codeCoverageIgnore
  116. */
  117. public function getDebugInfo(): array
  118. {
  119. 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,);
  120. }
  121. public function getSourceContext(): Source
  122. {
  123. return new Source("<div class=\"module module-slideshow\">
  124. {% if is_granted(\x27ROLE_ADMIN\x27) %}
  125. <div class=\"admin-tools\">
  126. <a href=\"{{ path(\x27admin_modulecarousel_edit\x27,{hookId:module.id}) }}\" class=\"admin-update\" target=\"_blank\">modifier</a>
  127. </div>
  128. {% endif %}
  129. <div class=\"ctn\">
  130. <ul class=\"slideshow\">
  131. {% for item in module.data.items %}
  132. {% if item.matchPriceContext(customerMgr.getPriceContext()) %}
  133. {% if (app.request.getLocale() == \x27fr\x27) and item.imgFr %}
  134. <li><a href=\"{{ item.getUrlFr() }}\"><img src=\"{{ asset(item.imgFr) }}\" alt=\"\"></a></li>
  135. {% elseif (app.request.getLocale() == \x27en\x27) and item.imgEn %}
  136. <li><a href=\"{{ item.getUrlEn() }}\"><img src=\"{{ asset(item.imgEn) }}\" alt=\"\"></a></li>
  137. {% endif %}
  138. {% endif %}
  139. {% endfor %}
  140. </ul>
  141. </div>
  142. </div>", "front/modules/slideshow/block.html.twig", "/var/www/dogcat.com/v2-test/templates/front/modules/slideshow/block.html.twig");
  143. }
  144. }