var/cache/dev/twig/ff/ffc7e04019306e11e90fb3321b3c39d3.php line 175

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