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

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