var/cache/dev/twig/b1/b1d3ddf2848ace888cff2a7c05212ed0.php line 34

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. /* front/modules/featured/block.html.twig */
  15. class __TwigTemplate_77d2bd6615207b6cdc8b10729c1ed937 extends Template
  16. {
  17. private $source;
  18. private $macros = [];
  19. public function __construct(Environment $env)
  20. {
  21. parent::__construct($env);
  22. $this->source = $this->getSourceContext();
  23. $this->parent = false;
  24. $this->blocks = [
  25. ];
  26. }
  27. protected function doDisplay(array $context, array $blocks = [])
  28. {
  29. $macros = $this->macros;
  30. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  31. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/modules/featured/block.html.twig"));
  32. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  33. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/modules/featured/block.html.twig"));
  34. // line 1
  35. 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)) {
  36. // line 2
  37. yield " ";
  38. $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);
  39. // line 3
  40. yield " ";
  41. 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))) {
  42. // line 4
  43. yield " ";
  44. $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);
  45. // line 5
  46. yield " ";
  47. }
  48. // line 6
  49. yield " <div class=\"module module-product\">
  50. ";
  51. // line 7
  52. if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) {
  53. // line 8
  54. yield " <div class=\"admin-tools\">
  55. <a href=\"";
  56. // line 9
  57. 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);
  58. yield "\" class=\"admin-update\" target=\"_blank\">modifier</a>
  59. </div>
  60. ";
  61. }
  62. // line 12
  63. yield " <div class=\"ctn\">
  64. ";
  65. // line 13
  66. 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"]));
  67. // line 14
  68. yield " </div>
  69. </div>
  70. ";
  71. }
  72. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  73. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  74. return; yield '';
  75. }
  76. /**
  77. * @codeCoverageIgnore
  78. */
  79. public function getTemplateName()
  80. {
  81. return "front/modules/featured/block.html.twig";
  82. }
  83. /**
  84. * @codeCoverageIgnore
  85. */
  86. public function isTraitable()
  87. {
  88. return false;
  89. }
  90. /**
  91. * @codeCoverageIgnore
  92. */
  93. public function getDebugInfo()
  94. {
  95. 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,);
  96. }
  97. public function getSourceContext()
  98. {
  99. return new Source("{% if module.data.products %}
  100. {% set title = module.data.titleFr %}
  101. {% if (app.request.getLocale() == 'en') and module.data.titleEn %}
  102. {% set title = module.data.titleEn %}
  103. {% endif %}
  104. <div class=\"module module-product\">
  105. {% if is_granted('ROLE_ADMIN') %}
  106. <div class=\"admin-tools\">
  107. <a href=\"{{ path('admin_modulefeatured_edit',{hookId:module.id}) }}\" class=\"admin-update\" target=\"_blank\">modifier</a>
  108. </div>
  109. {% endif %}
  110. <div class=\"ctn\">
  111. {% include 'front/catalog/product/carousel.html.twig' with { products:module.data.products, title:title, productTitleTag:'h2' } %}
  112. </div>
  113. </div>
  114. {% endif %}", "front/modules/featured/block.html.twig", "/var/www/dogcat.com/v2-test/templates/front/modules/featured/block.html.twig");
  115. }
  116. }