var/cache/dev/twig/14/144654d383b22a50dfb123bd3864cc6f72f6cf17241854ff5ac8a01c0357d08d.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_1491d260c99130735e7665806e75f80c30c3a08bd425ff44c338055ec3779732 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_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@SyliusShop/Product/Show/_inventory.html.twig"));
  31.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_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->sourcetwig_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); })()), "enabledVariants", [], "any"falsefalsefalse1), "empty", [], "method"falsefalsefalse1) || (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"falsefalsefalse1) &&  !$this->env->getFunction('sylius_inventory_is_available')->getCallable()(twig_get_attribute($this->env$this->sourcetwig_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); })()), "enabledVariants", [], "any"falsefalsefalse1), "first", [], "any"falsefalsefalse1))))) {
  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"falsefalsefalse4)]));
  42.             echo "
  43. ";
  44.         }
  45.         
  46.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  47.         
  48.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  49.     }
  50.     public function getTemplateName()
  51.     {
  52.         return "@SyliusShop/Product/Show/_inventory.html.twig";
  53.     }
  54.     public function isTraitable()
  55.     {
  56.         return false;
  57.     }
  58.     public function getDebugInfo()
  59.     {
  60.         return array (  49 => 4,  45 => 2,  43 => 1,);
  61.     }
  62.     public function getSourceContext()
  63.     {
  64.         return new Source("{% if product.enabledVariants.empty() or product.simple and not sylius_inventory_is_available(product.enabledVariants.first) %}
  65.     {% include '@SyliusShop/Product/Show/_outOfStock.html.twig' %}
  66. {% else %}
  67.     {{ render(url('sylius_shop_partial_cart_add_item', {'template': '@SyliusShop/Product/Show/_addToCart.html.twig', 'productId': product.id})) }}
  68. {% endif %}
  69. ""@SyliusShop/Product/Show/_inventory.html.twig""/var/www/html/templates/bundles/SyliusShopBundle/Product/Show/_inventory.html.twig");
  70.     }
  71. }