var/cache/dev/twig/d1/d13f5ebddf3b634b2b4fc342d3863683.php line 33

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_ac2050e5e4bc0fc98aaa150783447b7b 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->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_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  47.         
  48.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_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/Bikers/templates/bundles/SyliusShopBundle/Product/Show/_inventory.html.twig");
  70.     }
  71. }