var/cache/dev/twig/c4/c431578c65f6bdac0c481b2a398fda40.php line 50

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* @SyliusShop/Product/Show/_inventory.html.twig */
  14. class __TwigTemplate_f1e0c78271cf992099077becc8ce7631 extends \Twig\Template
  15. {
  16. private $source;
  17. private $macros = [];
  18. public function __construct(Environment $env)
  19. {
  20. parent::__construct($env);
  21. $this->source = $this->getSourceContext();
  22. $this->parent = false;
  23. $this->blocks = [
  24. ];
  25. }
  26. protected function doDisplay(array $context, array $blocks = [])
  27. {
  28. $macros = $this->macros;
  29. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@SyliusShop/Product/Show/_inventory.html.twig"));
  31. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@SyliusShop/Product/Show/_inventory.html.twig"));
  33. // line 1
  34. if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($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); })()), "variants", [], "any", false, false, false, 1), "empty", [], "method", false, false, false, 1) || (twig_get_attribute($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); })()), "simple", [], "any", false, false, false, 1) && !$this->env->getFunction('sylius_inventory_is_available')->getCallable()(twig_get_attribute($this->env, $this->source, twig_get_attribute($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); })()), "variants", [], "any", false, false, false, 1), "first", [], "any", false, false, false, 1))))) {
  35. // line 2
  36. echo " ";
  37. $this->loadTemplate("@SyliusShop/Product/Show/_outOfStock.html.twig", "@SyliusShop/Product/Show/_inventory.html.twig", 2)->display($context);
  38. } else {
  39. // line 4
  40. echo " ";
  41. echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("sylius_shop_partial_cart_add_item", ["template" => "@SyliusShop/Product/Show/_addToCart.html.twig", "productId" => twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 4, $this->source); })()), "id", [], "any", false, false, false, 4)]));
  42. echo "
  43. ";
  44. }
  45. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  46. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  47. }
  48. public function getTemplateName()
  49. {
  50. return "@SyliusShop/Product/Show/_inventory.html.twig";
  51. }
  52. public function isTraitable()
  53. {
  54. return false;
  55. }
  56. public function getDebugInfo()
  57. {
  58. return array ( 49 => 4, 45 => 2, 43 => 1,);
  59. }
  60. public function getSourceContext()
  61. {
  62. return new Source("{% if product.variants.empty() or product.simple and not sylius_inventory_is_available(product.variants.first) %}
  63. {% include '@SyliusShop/Product/Show/_outOfStock.html.twig' %}
  64. {% else %}
  65. {{ render(url('sylius_shop_partial_cart_add_item', {'template': '@SyliusShop/Product/Show/_addToCart.html.twig', 'productId': product.id})) }}
  66. {% endif %}
  67. ", "@SyliusShop/Product/Show/_inventory.html.twig", "/home/hephaestos.eu/public_html/hephsite/templates/bundles/SyliusShopBundle/Product/Show/_inventory.html.twig");
  68. }
  69. }