var/cache/dev/twig/9e/9e1b0f013a9da94a7ccf0df139f7766304fe1cc92ac7e6eab87eedbfb77ddefb.php line 53

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_e498677469f3d3cf4fbe97aa6c0328950d20bd886b81bdb482d77239ca076fe5 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); })()), "variants", [], "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); })()), "variants", [], "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.             if (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); })()), "isBundle", [], "any"falsefalsefalse4)) {
  42.                 // line 5
  43.                 echo "        ";
  44.                 echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("bitbag_sulius_product_bundle_shop_partial_cart_add_product_bundle", ["template" => "@BitBagSyliusProductBundlePlugin/Shop/Product/_addProductBundleToCart.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.'5$this->source); })()), "id", [], "any"falsefalsefalse5)]));
  45.                 echo "
  46.     ";
  47.             } else {
  48.                 // line 7
  49.                 echo "        ";
  50.                 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.'7$this->source); })()), "id", [], "any"falsefalsefalse7)]));
  51.                 echo "
  52.     ";
  53.             }
  54.         }
  55.         
  56.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  57.         
  58.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  59.     }
  60.     public function getTemplateName()
  61.     {
  62.         return "@SyliusShop/Product/Show/_inventory.html.twig";
  63.     }
  64.     public function isTraitable()
  65.     {
  66.         return false;
  67.     }
  68.     public function getDebugInfo()
  69.     {
  70.         return array (  58 => 7,  52 => 5,  49 => 4,  45 => 2,  43 => 1,);
  71.     }
  72.     public function getSourceContext()
  73.     {
  74.         return new Source("{% if product.variants.empty() or product.simple and not sylius_inventory_is_available(product.variants.first) %}
  75.     {% include '@SyliusShop/Product/Show/_outOfStock.html.twig' %}
  76. {% else %}
  77.     {% if product.isBundle %}
  78.         {{ render(url('bitbag_sulius_product_bundle_shop_partial_cart_add_product_bundle', {'template': '@BitBagSyliusProductBundlePlugin/Shop/Product/_addProductBundleToCart.html.twig', 'productId': product.id})) }}
  79.     {% else %}
  80.         {{ render(url('sylius_shop_partial_cart_add_item', {'template': '@SyliusShop/Product/Show/_addToCart.html.twig', 'productId': product.id})) }}
  81.     {% endif %}
  82. {% endif %}
  83. ""@SyliusShop/Product/Show/_inventory.html.twig""/home/6nergiesboutique/www_preprod/themes/BootstrapTheme/templates/bundles/SyliusShopBundle/Product/Show/_inventory.html.twig");
  84.     }
  85. }