var/cache/dev/twig/71/71f4176d413af380a0f77ac26a8ab5cb.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/stock.html.twig */
  16. class __TwigTemplate_79b28b4feab91bf1ab79be4e246964c9 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/stock.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/stock.html.twig"));
  38. // line 1
  39. yield "<div class=\"stock\">
  40. <div class=\"model\">";
  41. // line 2
  42. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\TextExtension']->unpad(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.', 2, $this->source); })()), "modelSAP", [], "any", false, false, false, 2)), "html", null, true);
  43. yield "</div>
  44. ";
  45. // line 3
  46. 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.', 3, $this->source); })()), "isAvailable", [], "method", false, false, false, 3)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  47. // line 4
  48. yield " <span class=\"stock-status available green\">";
  49. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("disponible", [], "messages");
  50. yield "</span>
  51. ";
  52. } elseif ((($tmp = CoreExtension::getAttribute($this->env, $this->source, // line 5
  53. (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 5, $this->source); })()), "isStopped", [], "method", false, false, false, 5)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  54. // line 6
  55. yield " <span class=\"stock-status unavailable red\">";
  56. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("PRODUIT ARRÊTÉ", [], "messages");
  57. yield "</span>
  58. ";
  59. } else {
  60. // line 8
  61. yield " <span class=\"stock-status unavailable orange\">";
  62. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("NON DISPONIBLE<br>IMMÉDIATEMENT", [], "messages");
  63. yield "</span>
  64. ";
  65. }
  66. // line 10
  67. yield "</div>";
  68. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  69. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  70. yield from [];
  71. }
  72. /**
  73. * @codeCoverageIgnore
  74. */
  75. public function getTemplateName(): string
  76. {
  77. return "front/catalog/product/view/stock.html.twig";
  78. }
  79. /**
  80. * @codeCoverageIgnore
  81. */
  82. public function isTraitable(): bool
  83. {
  84. return false;
  85. }
  86. /**
  87. * @codeCoverageIgnore
  88. */
  89. public function getDebugInfo(): array
  90. {
  91. return array ( 76 => 10, 70 => 8, 64 => 6, 62 => 5, 57 => 4, 55 => 3, 51 => 2, 48 => 1,);
  92. }
  93. public function getSourceContext(): Source
  94. {
  95. return new Source("<div class=\"stock\">
  96. <div class=\"model\">{{ product.modelSAP|unpad }}</div>
  97. {% if product.isAvailable() %}
  98. <span class=\"stock-status available green\">{% trans %}disponible{% endtrans %}</span>
  99. {% elseif product.isStopped() %}
  100. <span class=\"stock-status unavailable red\">{% trans %}PRODUIT ARRÊTÉ{% endtrans %}</span>
  101. {% else %}
  102. <span class=\"stock-status unavailable orange\">{% trans %}NON DISPONIBLE<br>IMMÉDIATEMENT{% endtrans %}</span>
  103. {% endif %}
  104. </div>", "front/catalog/product/view/stock.html.twig", "/var/www/dogcat.com/v2-test/templates/front/catalog/product/view/stock.html.twig");
  105. }
  106. }