var/cache/dev/twig/3c/3c1b3390cfeaa3f6893151ff4b3e3e6a.php line 38

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/model/view/caracteristics.html.twig */
  16. class __TwigTemplate_ffd94ab4429d9eff4fc1009a0f5cdcc7 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/model/view/caracteristics.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/model/view/caracteristics.html.twig"));
  38. // line 1
  39. if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 1, $this->source); })()), "caracteristics", [], "any", false, false, false, 1)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  40. // line 2
  41. yield "<div class=\"tab-content rte section caracteristics\" style=\"padding: 30px 0;\">
  42. <div class=\"title-ctn\">
  43. <div class=\"title\">";
  44. // line 4
  45. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Caractéristiques", [], "messages");
  46. yield "</div>
  47. <hr>
  48. </div>
  49. <table>
  50. <tbody>
  51. ";
  52. // line 9
  53. $context['_parent'] = $context;
  54. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 9, $this->source); })()));
  55. foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
  56. // line 10
  57. yield " ";
  58. $context['_parent'] = $context;
  59. $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["p"], "caracteristics", [], "any", false, false, false, 10));
  60. foreach ($context['_seq'] as $context["_key"] => $context["attribute"]) {
  61. // line 11
  62. yield " ";
  63. if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "value", [], "any", false, false, false, 11)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  64. // line 12
  65. yield " ";
  66. if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 12), "code", [], "any", false, false, false, 12) == "origin_country")) {
  67. // line 13
  68. yield " ";
  69. if ((CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "value", [], "any", false, false, false, 13) == "France")) {
  70. // line 14
  71. yield " <tr class=\"attribute-";
  72. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["p"], "id", [], "any", false, false, false, 14), "html", null, true);
  73. yield "\" data-attr=\"";
  74. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 14), "code", [], "any", false, false, false, 14), "html", null, true);
  75. yield "\" data-aid=\"";
  76. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 14), "id", [], "any", false, false, false, 14), "html", null, true);
  77. yield "\" data-paid=\"";
  78. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "id", [], "any", false, false, false, 14), "html", null, true);
  79. yield "\">
  80. <td>";
  81. // line 15
  82. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 15), "title", [], "any", false, false, false, 15), "html", null, true);
  83. yield "</td>
  84. <td>";
  85. // line 16
  86. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "value", [], "any", false, false, false, 16), "html", null, true);
  87. yield "</td>
  88. </tr>
  89. ";
  90. } elseif (CoreExtension::inFilter(CoreExtension::getAttribute($this->env, $this->source, // line 18
  91. $context["attribute"], "value", [], "any", false, false, false, 18), ["Allemagne", "Belgique", "Espagne", "Italie", "Pologne", "Roumanie", "Grande Bretagne", "Union Européenne"])) {
  92. // line 19
  93. yield " <tr class=\"attribute-";
  94. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["p"], "id", [], "any", false, false, false, 19), "html", null, true);
  95. yield "\" data-attr=\"";
  96. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 19), "code", [], "any", false, false, false, 19), "html", null, true);
  97. yield "\" data-aid=\"";
  98. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 19), "id", [], "any", false, false, false, 19), "html", null, true);
  99. yield "\" data-paid=\"";
  100. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "id", [], "any", false, false, false, 19), "html", null, true);
  101. yield "\">
  102. <td>";
  103. // line 20
  104. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 20), "title", [], "any", false, false, false, 20), "html", null, true);
  105. yield "</td>
  106. <td>Europe</td>
  107. </tr>
  108. ";
  109. }
  110. // line 24
  111. yield " ";
  112. } elseif (((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 24), "code", [], "any", false, false, false, 24) == "product_brand") && CoreExtension::getAttribute($this->env, $this->source, $context["p"], "manufacturer", [], "any", false, false, false, 24))) {
  113. // line 25
  114. yield " <tr class=\"attribute-";
  115. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["p"], "id", [], "any", false, false, false, 25), "html", null, true);
  116. yield "\" data-attr=\"";
  117. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 25), "code", [], "any", false, false, false, 25), "html", null, true);
  118. yield "\" data-aid=\"";
  119. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 25), "id", [], "any", false, false, false, 25), "html", null, true);
  120. yield "\" data-paid=\"";
  121. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "id", [], "any", false, false, false, 25), "html", null, true);
  122. yield "\">
  123. <td>";
  124. // line 26
  125. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 26), "title", [], "any", false, false, false, 26), "html", null, true);
  126. yield "</td>
  127. <td><a href=\"";
  128. // line 27
  129. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("manufacturer", ["id" => CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["p"], "manufacturer", [], "any", false, false, false, 27), "id", [], "any", false, false, false, 27), "url" => CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["p"], "manufacturer", [], "any", false, false, false, 27), "url", [], "any", false, false, false, 27)]), "html", null, true);
  130. yield "\">";
  131. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["p"], "manufacturer", [], "any", false, false, false, 27), "name", [], "any", false, false, false, 27), "html", null, true);
  132. yield "</a></td>
  133. </tr>
  134. ";
  135. } else {
  136. // line 30
  137. yield " <tr class=\"attribute-";
  138. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["p"], "id", [], "any", false, false, false, 30), "html", null, true);
  139. yield "\" data-attr=\"";
  140. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 30), "code", [], "any", false, false, false, 30), "html", null, true);
  141. yield "\" data-aid=\"";
  142. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 30), "id", [], "any", false, false, false, 30), "html", null, true);
  143. yield "\" data-paid=\"";
  144. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "id", [], "any", false, false, false, 30), "html", null, true);
  145. yield "\">
  146. <td>";
  147. // line 31
  148. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 31), "title", [], "any", false, false, false, 31), "html", null, true);
  149. yield "</td>
  150. <td>
  151. ";
  152. // line 33
  153. if ((($tmp = $context["attribute"]) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  154. // line 34
  155. yield " ";
  156. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "displayedValue", [], "any", false, false, false, 34), "html", null, true);
  157. yield "
  158. ";
  159. } elseif ((CoreExtension::getAttribute($this->env, $this->source, // line 35
  160. $context["attribute"], "value", [], "any", false, false, false, 35) == 1)) {
  161. // line 36
  162. yield " ";
  163. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Oui"), "html", null, true);
  164. yield "
  165. ";
  166. } elseif ((CoreExtension::getAttribute($this->env, $this->source, // line 37
  167. $context["attribute"], "value", [], "any", false, false, false, 37) == 0)) {
  168. // line 38
  169. yield " ";
  170. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Non"), "html", null, true);
  171. yield "
  172. ";
  173. }
  174. // line 40
  175. yield " </td>
  176. </tr>
  177. ";
  178. }
  179. // line 43
  180. yield " ";
  181. }
  182. // line 44
  183. yield " ";
  184. }
  185. $_parent = $context['_parent'];
  186. unset($context['_seq'], $context['_key'], $context['attribute'], $context['_parent']);
  187. $context = array_intersect_key($context, $_parent) + $_parent;
  188. // line 45
  189. yield " ";
  190. }
  191. $_parent = $context['_parent'];
  192. unset($context['_seq'], $context['_key'], $context['p'], $context['_parent']);
  193. $context = array_intersect_key($context, $_parent) + $_parent;
  194. // line 46
  195. yield " </tbody>
  196. </table>
  197. </div>
  198. ";
  199. }
  200. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  201. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  202. yield from [];
  203. }
  204. /**
  205. * @codeCoverageIgnore
  206. */
  207. public function getTemplateName(): string
  208. {
  209. return "front/catalog/model/view/caracteristics.html.twig";
  210. }
  211. /**
  212. * @codeCoverageIgnore
  213. */
  214. public function isTraitable(): bool
  215. {
  216. return false;
  217. }
  218. /**
  219. * @codeCoverageIgnore
  220. */
  221. public function getDebugInfo(): array
  222. {
  223. return array ( 204 => 46, 198 => 45, 192 => 44, 189 => 43, 184 => 40, 178 => 38, 176 => 37, 171 => 36, 169 => 35, 164 => 34, 162 => 33, 157 => 31, 146 => 30, 138 => 27, 134 => 26, 123 => 25, 120 => 24, 113 => 20, 102 => 19, 100 => 18, 95 => 16, 91 => 15, 80 => 14, 77 => 13, 74 => 12, 71 => 11, 66 => 10, 62 => 9, 54 => 4, 50 => 2, 48 => 1,);
  224. }
  225. public function getSourceContext(): Source
  226. {
  227. return new Source("{% if product.caracteristics %}
  228. <div class=\"tab-content rte section caracteristics\" style=\"padding: 30px 0;\">
  229. <div class=\"title-ctn\">
  230. <div class=\"title\">{% trans %}Caractéristiques{% endtrans %}</div>
  231. <hr>
  232. </div>
  233. <table>
  234. <tbody>
  235. {% for p in products %}
  236. {% for attribute in p.caracteristics %}
  237. {% if attribute.value %}
  238. {% if attribute.attribute.code == \x27origin_country\x27 %}
  239. {% if attribute.value == \x27France\x27 %}
  240. <tr class=\"attribute-{{ p.id }}\" data-attr=\"{{ attribute.attribute.code }}\" data-aid=\"{{ attribute.attribute.id }}\" data-paid=\"{{ attribute.id }}\">
  241. <td>{{ attribute.attribute.title }}</td>
  242. <td>{{ attribute.value }}</td>
  243. </tr>
  244. {% elseif attribute.value in [\x27Allemagne\x27,\x27Belgique\x27,\x27Espagne\x27,\x27Italie\x27,\x27Pologne\x27,\x27Roumanie\x27,\x27Grande Bretagne\x27,\x27Union Européenne\x27] %}
  245. <tr class=\"attribute-{{ p.id }}\" data-attr=\"{{ attribute.attribute.code }}\" data-aid=\"{{ attribute.attribute.id }}\" data-paid=\"{{ attribute.id }}\">
  246. <td>{{ attribute.attribute.title }}</td>
  247. <td>Europe</td>
  248. </tr>
  249. {% endif %}
  250. {% elseif attribute.attribute.code == \x27product_brand\x27 and p.manufacturer %}
  251. <tr class=\"attribute-{{ p.id }}\" data-attr=\"{{ attribute.attribute.code }}\" data-aid=\"{{ attribute.attribute.id }}\" data-paid=\"{{ attribute.id }}\">
  252. <td>{{ attribute.attribute.title }}</td>
  253. <td><a href=\"{{ path(\x27manufacturer\x27, {id:p.manufacturer.id, url:p.manufacturer.url}) }}\">{{ p.manufacturer.name }}</a></td>
  254. </tr>
  255. {% else %}
  256. <tr class=\"attribute-{{ p.id }}\" data-attr=\"{{ attribute.attribute.code }}\" data-aid=\"{{ attribute.attribute.id }}\" data-paid=\"{{ attribute.id }}\">
  257. <td>{{ attribute.attribute.title }}</td>
  258. <td>
  259. {% if attribute %}
  260. {{ attribute.displayedValue }}
  261. {% elseif attribute.value == 1 %}
  262. {{ \x27Oui\x27 | trans }}
  263. {% elseif attribute.value == 0 %}
  264. {{ \x27Non\x27 | trans }}
  265. {% endif %}
  266. </td>
  267. </tr>
  268. {% endif %}
  269. {% endif %}
  270. {% endfor %}
  271. {% endfor %}
  272. </tbody>
  273. </table>
  274. </div>
  275. {% endif %}
  276. ", "front/catalog/model/view/caracteristics.html.twig", "/var/www/dogcat.com/v2-test/templates/front/catalog/model/view/caracteristics.html.twig");
  277. }
  278. }