var/cache/dev/twig/57/572c4f6fa8398aeb2506df25ecc31a8b.php line 179

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