var/cache/dev/twig/4c/4c6aa8a30fa7dcb3c827aef137b25aca.php line 181

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/catalog/product/list.html.twig */
  16. class __TwigTemplate_54a0e0daee72e46085586d966db638aa 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/catalog/product/list.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/catalog/product/list.html.twig"));
  38. // line 1
  39. if ((($tmp = !array_key_exists("titleTag", $context)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  40. // line 2
  41. yield " ";
  42. $context["titleTag"] = "div";
  43. }
  44. // line 4
  45. if ((($tmp = !array_key_exists("showFilter", $context)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  46. // line 5
  47. yield " ";
  48. $context["showFilter"] = true;
  49. }
  50. // line 7
  51. $context["filterForm"] = (array_key_exists("productCount", $context) || (array_key_exists("filters", $context) && (isset($context["filters"]) || array_key_exists("filters", $context) ? $context["filters"] : (function () { throw new RuntimeError('Variable "filters" does not exist.', 7, $this->source); })())));
  52. // line 8
  53. yield "
  54. <div class=\"product-list-ctn ";
  55. // line 9
  56. if (array_key_exists("listClass", $context)) {
  57. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["listClass"]) || array_key_exists("listClass", $context) ? $context["listClass"] : (function () { throw new RuntimeError('Variable "listClass" does not exist.', 9, $this->source); })()), "html", null, true);
  58. }
  59. yield "\">
  60. \t";
  61. // line 10
  62. if ((($tmp = (isset($context["showFilter"]) || array_key_exists("showFilter", $context) ? $context["showFilter"] : (function () { throw new RuntimeError('Variable "showFilter" does not exist.', 10, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  63. // line 11
  64. yield "\t\t<div class=\"product-list-header\">
  65. \t\t\t";
  66. // line 12
  67. if ((($tmp = (isset($context["filterForm"]) || array_key_exists("filterForm", $context) ? $context["filterForm"] : (function () { throw new RuntimeError('Variable "filterForm" does not exist.', 12, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  68. // line 13
  69. yield "\t\t\t\t<form class=\"product-selection collapse\" ";
  70. if (array_key_exists("filterUrl", $context)) {
  71. yield "action=\"";
  72. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["filterUrl"]) || array_key_exists("filterUrl", $context) ? $context["filterUrl"] : (function () { throw new RuntimeError('Variable "filterUrl" does not exist.', 13, $this->source); })()), "html", null, true);
  73. yield "\"";
  74. }
  75. yield ">
  76. \t\t\t";
  77. }
  78. // line 15
  79. yield "\t\t\t";
  80. if ((array_key_exists("filters", $context) && (isset($context["filters"]) || array_key_exists("filters", $context) ? $context["filters"] : (function () { throw new RuntimeError('Variable "filters" does not exist.', 15, $this->source); })()))) {
  81. // line 16
  82. yield "\t\t\t\t";
  83. yield from $this->load("front/catalog/category/filter.html.twig", 16)->unwrap()->yield($context);
  84. // line 17
  85. yield "\t\t\t";
  86. }
  87. // line 18
  88. yield "\t\t\t";
  89. if (array_key_exists("productCount", $context)) {
  90. // line 19
  91. yield "\t\t\t<div class=\"sort\">
  92. \t";
  93. // line 21
  94. yield " ";
  95. if ((($tmp = !array_key_exists("sort", $context)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  96. // line 22
  97. yield " ";
  98. $context["sort"] = "";
  99. // line 23
  100. yield " ";
  101. }
  102. // line 24
  103. yield " <select name=\"sort\" id=\"list-sort\" class=\"select2\" data-placeholder=\"";
  104. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Trier par", [], "messages");
  105. yield "\">
  106. <option value=\"\" ";
  107. // line 25
  108. if (((isset($context["sort"]) || array_key_exists("sort", $context) ? $context["sort"] : (function () { throw new RuntimeError('Variable "sort" does not exist.', 25, $this->source); })()) == "")) {
  109. yield "selected";
  110. }
  111. yield ">";
  112. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Trier par", [], "messages");
  113. yield " :</option>
  114. <option value=\"name-asc\" ";
  115. // line 26
  116. if (((isset($context["sort"]) || array_key_exists("sort", $context) ? $context["sort"] : (function () { throw new RuntimeError('Variable "sort" does not exist.', 26, $this->source); })()) == "name-asc")) {
  117. yield "selected";
  118. }
  119. yield ">";
  120. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Nom", [], "messages");
  121. yield "</option>
  122. <option value=\"price-asc\" ";
  123. // line 27
  124. if (((isset($context["sort"]) || array_key_exists("sort", $context) ? $context["sort"] : (function () { throw new RuntimeError('Variable "sort" does not exist.', 27, $this->source); })()) == "price-asc")) {
  125. yield "selected";
  126. }
  127. yield ">";
  128. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Prix croissant", [], "messages");
  129. yield "</option>
  130. <option value=\"price-desc\" ";
  131. // line 28
  132. if (((isset($context["sort"]) || array_key_exists("sort", $context) ? $context["sort"] : (function () { throw new RuntimeError('Variable "sort" does not exist.', 28, $this->source); })()) == "price-desc")) {
  133. yield "selected";
  134. }
  135. yield ">";
  136. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Prix décroissant", [], "messages");
  137. yield "</option>
  138. </select>
  139. \t\t\t</div>
  140. \t\t\t";
  141. }
  142. // line 32
  143. yield "\t\t\t";
  144. if ((($tmp = (isset($context["filterForm"]) || array_key_exists("filterForm", $context) ? $context["filterForm"] : (function () { throw new RuntimeError('Variable "filterForm" does not exist.', 32, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  145. // line 33
  146. yield "\t\t\t\t</form>
  147. \t\t\t";
  148. }
  149. // line 35
  150. yield "\t\t</div>
  151. \t";
  152. }
  153. // line 37
  154. yield "\t";
  155. 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.', 37, $this->source); })()))) {
  156. // line 38
  157. yield "\t<div class=\"title-ctn\">
  158. \t\t<";
  159. // line 39
  160. 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.', 39, $this->source); })()), "html", null, true);
  161. yield " class=\"title\">";
  162. 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.', 39, $this->source); })()), "html", null, true);
  163. yield "</";
  164. 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.', 39, $this->source); })()), "html", null, true);
  165. yield ">
  166. \t\t<hr>
  167. \t</div>
  168. \t";
  169. }
  170. // line 43
  171. yield "\t";
  172. yield from $this->load("front/catalog/product/view/list.html.twig", 43)->unwrap()->yield(CoreExtension::merge($context, ["products" => (isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 43, $this->source); })())]));
  173. // line 44
  174. yield "\t";
  175. if (array_key_exists("nbPages", $context)) {
  176. // line 45
  177. yield "\t<div class=\"pagination-ctn\">
  178. \t\t";
  179. // line 46
  180. yield from $this->load("front/catalog/product/pagination.html.twig", 46)->unwrap()->yield(CoreExtension::merge($context, ["nbPages" => (isset($context["nbPages"]) || array_key_exists("nbPages", $context) ? $context["nbPages"] : (function () { throw new RuntimeError('Variable "nbPages" does not exist.', 46, $this->source); })()), "page" => (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 46, $this->source); })())]));
  181. // line 47
  182. yield "\t</div>
  183. \t";
  184. }
  185. // line 49
  186. yield "</div>";
  187. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  188. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  189. yield from [];
  190. }
  191. /**
  192. * @codeCoverageIgnore
  193. */
  194. public function getTemplateName(): string
  195. {
  196. return "front/catalog/product/list.html.twig";
  197. }
  198. /**
  199. * @codeCoverageIgnore
  200. */
  201. public function isTraitable(): bool
  202. {
  203. return false;
  204. }
  205. /**
  206. * @codeCoverageIgnore
  207. */
  208. public function getDebugInfo(): array
  209. {
  210. return array ( 195 => 49, 191 => 47, 189 => 46, 186 => 45, 183 => 44, 180 => 43, 169 => 39, 166 => 38, 163 => 37, 159 => 35, 155 => 33, 152 => 32, 141 => 28, 133 => 27, 125 => 26, 117 => 25, 112 => 24, 109 => 23, 106 => 22, 103 => 21, 100 => 19, 97 => 18, 94 => 17, 91 => 16, 88 => 15, 78 => 13, 76 => 12, 73 => 11, 71 => 10, 65 => 9, 62 => 8, 60 => 7, 56 => 5, 54 => 4, 50 => 2, 48 => 1,);
  211. }
  212. public function getSourceContext(): Source
  213. {
  214. return new Source("{% if titleTag is not defined %}
  215. {% set titleTag = \x27div\x27 %}
  216. {% endif %}
  217. {% if showFilter is not defined %}
  218. {% set showFilter = true %}
  219. {% endif %}
  220. {% set filterForm = (productCount is defined) or (filters is defined and filters) %}
  221. <div class=\"product-list-ctn {%if listClass is defined%}{{ listClass }}{% endif %}\">
  222. \t{% if showFilter %}
  223. \t\t<div class=\"product-list-header\">
  224. \t\t\t{% if filterForm %}
  225. \t\t\t\t<form class=\"product-selection collapse\" {% if filterUrl is defined %}action=\"{{ filterUrl }}\"{% endif %}>
  226. \t\t\t{% endif %}
  227. \t\t\t{% if filters is defined and filters %}
  228. \t\t\t\t{% include \x27front/catalog/category/filter.html.twig\x27 %}
  229. \t\t\t{% endif %}
  230. \t\t\t{% if productCount is defined %}
  231. \t\t\t<div class=\"sort\">
  232. \t{# <label for=\"list-sort\">{% trans %}trier par :{% endtrans %}</label>#}
  233. {% if sort is not defined %}
  234. {% set sort = \x27\x27 %}
  235. {% endif %}
  236. <select name=\"sort\" id=\"list-sort\" class=\"select2\" data-placeholder=\"{% trans %}Trier par {% endtrans %}\">
  237. <option value=\"\" {% if sort == \x27\x27 %}selected{% endif %}>{% trans %}Trier par {% endtrans %} :</option>
  238. <option value=\"name-asc\" {% if sort == \x27name-asc\x27 %}selected{% endif %}>{% trans %}Nom{% endtrans %}</option>
  239. <option value=\"price-asc\" {% if sort == \x27price-asc\x27 %}selected{% endif %}>{% trans %}Prix croissant{% endtrans %}</option>
  240. <option value=\"price-desc\" {% if sort == \x27price-desc\x27 %}selected{% endif %}>{% trans %}Prix décroissant{% endtrans %}</option>
  241. </select>
  242. \t\t\t</div>
  243. \t\t\t{% endif %}
  244. \t\t\t{% if filterForm %}
  245. \t\t\t\t</form>
  246. \t\t\t{% endif %}
  247. \t\t</div>
  248. \t{% endif %}
  249. \t{% if title is defined and title %}
  250. \t<div class=\"title-ctn\">
  251. \t\t<{{ titleTag }} class=\"title\">{{ title }}</{{ titleTag }}>
  252. \t\t<hr>
  253. \t</div>
  254. \t{% endif %}
  255. \t{% include \x27front/catalog/product/view/list.html.twig\x27 with {products:products} %}
  256. \t{% if nbPages is defined %}
  257. \t<div class=\"pagination-ctn\">
  258. \t\t{% include \x27front/catalog/product/pagination.html.twig\x27 with {nbPages:nbPages, page:page} %}
  259. \t</div>
  260. \t{% endif %}
  261. </div>", "front/catalog/product/list.html.twig", "/var/www/dogcat.com/pim/templates/front/catalog/product/list.html.twig");
  262. }
  263. }