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