var/cache/dev/twig/8e/8eb1a9b04ac6c37954cd89fe1e2ac045.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/Box/_top_products.html.twig */
  14. class __TwigTemplate_2ffdfd6f2c21300ca407c86343ade13b 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/Box/_top_products.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/Box/_top_products.html.twig"));
  33.         // line 1
  34.         if ((twig_length_filter($this->env, (isset($context["products"]) || array_key_exists("products"$context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.'1$this->source); })())) > 0)) {
  35.             // line 2
  36.             echo "    ";
  37.             echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("sylius_shop_partial_taxon_show_by_slug", ["slug" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source,             // line 3
  38. (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'3$this->source); })()), "request", [], "any"falsefalsefalse3), "get", [=> "taxonSlug"], "method"falsefalsefalse3), "template" => "@SyliusShop/Taxon/_top-product-header.html.twig"]));
  39.             // line 5
  40.             echo "
  41.     ";
  42.             // line 7
  43.             $context['_parent'] = $context;
  44.             $context['_seq'] = twig_ensure_traversable((isset($context["products"]) || array_key_exists("products"$context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.'7$this->source); })()));
  45.             $context['loop'] = [
  46.               'parent' => $context['_parent'],
  47.               'index0' => 0,
  48.               'index'  => 1,
  49.               'first'  => true,
  50.             ];
  51.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  52.                 $length count($context['_seq']);
  53.                 $context['loop']['revindex0'] = $length 1;
  54.                 $context['loop']['revindex'] = $length;
  55.                 $context['loop']['length'] = $length;
  56.                 $context['loop']['last'] = === $length;
  57.             }
  58.             foreach ($context['_seq'] as $context["_key"] => $context["product"]) {
  59.                 // line 8
  60.                 echo "        ";
  61.                 $this->loadTemplate("@SyliusShop/Product/_box_inline.html.twig""@SyliusShop/Product/Box/_top_products.html.twig"8)->display($context);
  62.                 // line 9
  63.                 echo "    ";
  64.                 ++$context['loop']['index0'];
  65.                 ++$context['loop']['index'];
  66.                 $context['loop']['first'] = false;
  67.                 if (isset($context['loop']['length'])) {
  68.                     --$context['loop']['revindex0'];
  69.                     --$context['loop']['revindex'];
  70.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  71.                 }
  72.             }
  73.             $_parent $context['_parent'];
  74.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['product'], $context['_parent'], $context['loop']);
  75.             $context array_intersect_key($context$_parent) + $_parent;
  76.         }
  77.         
  78.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  79.         
  80.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  81.     }
  82.     public function getTemplateName()
  83.     {
  84.         return "@SyliusShop/Product/Box/_top_products.html.twig";
  85.     }
  86.     public function isTraitable()
  87.     {
  88.         return false;
  89.     }
  90.     public function getDebugInfo()
  91.     {
  92.         return array (  73 => 9,  70 => 8,  53 => 7,  49 => 5,  47 => 3,  45 => 2,  43 => 1,);
  93.     }
  94.     public function getSourceContext()
  95.     {
  96.         return new Source("{% if products|length > 0 %}
  97.     {{ render(url('sylius_shop_partial_taxon_show_by_slug', {
  98.         'slug': app.request.get('taxonSlug'),
  99.         'template': '@SyliusShop/Taxon/_top-product-header.html.twig'
  100.     })) }}
  101.     {% for product in products %}
  102.         {% include '@SyliusShop/Product/_box_inline.html.twig' %}
  103.     {% endfor %}
  104. {% endif %}
  105. ""@SyliusShop/Product/Box/_top_products.html.twig""/var/www/sudekusa-shop-test/themes/BootstrapChildTheme/SyliusShopBundle/views/Product/Box/_top_products.html.twig");
  106.     }
  107. }