var/cache/dev/twig/1e/1ec554d77a3ccc70e622e1d1e29c7645d8082867125c84de5f87201deac3604d.php line 87

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/Index/_main.html.twig */
  14. class __TwigTemplate_a90203fdfe5be05ac4a4ce31388a1799a75092f30e4936060a1b64b697fccae2 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/Index/_main.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/Index/_main.html.twig"));
  33.         // line 1
  34.         $macros["messages"] = $this->macros["messages"] = $this->loadTemplate("@SyliusUi/Macro/messages.html.twig""@SyliusShop/Product/Index/_main.html.twig"1)->unwrap();
  35.         // line 2
  36.         $macros["pagination"] = $this->macros["pagination"] = $this->loadTemplate("@SyliusUi/Macro/pagination.html.twig""@SyliusShop/Product/Index/_main.html.twig"2)->unwrap();
  37.         // line 3
  38.         echo "
  39. ";
  40.         // line 4
  41.         echo $this->extensions['Sylius\Bundle\UiBundle\Twig\TemplateEventExtension']->render("sylius.shop.product.index.search"$context);
  42.         echo "
  43. <div class=\"ui clearing hidden divider\"></div>
  44. ";
  45.         // line 8
  46.         echo $this->extensions['Sylius\Bundle\UiBundle\Twig\TemplateEventExtension']->render("sylius.shop.product.index.before_list", ["products" => twig_get_attribute($this->env$this->source, (isset($context["resources"]) || array_key_exists("resources"$context) ? $context["resources"] : (function () { throw new RuntimeError('Variable "resources" does not exist.'8$this->source); })()), "data", [], "any"falsefalsefalse8)]);
  47.         echo "
  48. ";
  49.         // line 10
  50.         if ((twig_length_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["resources"]) || array_key_exists("resources"$context) ? $context["resources"] : (function () { throw new RuntimeError('Variable "resources" does not exist.'10$this->source); })()), "data", [], "any"falsefalsefalse10)) > 0)) {
  51.             // line 11
  52.             echo "    <div class=\"ui three cards\" id=\"products\" ";
  53.             echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("products");
  54.             echo ">
  55.         ";
  56.             // line 12
  57.             $context['_parent'] = $context;
  58.             $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["resources"]) || array_key_exists("resources"$context) ? $context["resources"] : (function () { throw new RuntimeError('Variable "resources" does not exist.'12$this->source); })()), "data", [], "any"falsefalsefalse12));
  59.             $context['loop'] = [
  60.               'parent' => $context['_parent'],
  61.               'index0' => 0,
  62.               'index'  => 1,
  63.               'first'  => true,
  64.             ];
  65.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  66.                 $length count($context['_seq']);
  67.                 $context['loop']['revindex0'] = $length 1;
  68.                 $context['loop']['revindex'] = $length;
  69.                 $context['loop']['length'] = $length;
  70.                 $context['loop']['last'] = === $length;
  71.             }
  72.             foreach ($context['_seq'] as $context["_key"] => $context["product"]) {
  73.                 // line 13
  74.                 echo "            ";
  75.                 $this->loadTemplate("@SyliusShop/Product/_itemProduct.html.twig""@SyliusShop/Product/Index/_main.html.twig"13)->display($context);
  76.                 // line 14
  77.                 echo "        ";
  78.                 ++$context['loop']['index0'];
  79.                 ++$context['loop']['index'];
  80.                 $context['loop']['first'] = false;
  81.                 if (isset($context['loop']['length'])) {
  82.                     --$context['loop']['revindex0'];
  83.                     --$context['loop']['revindex'];
  84.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  85.                 }
  86.             }
  87.             $_parent $context['_parent'];
  88.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['product'], $context['_parent'], $context['loop']);
  89.             $context array_intersect_key($context$_parent) + $_parent;
  90.             // line 15
  91.             echo "    </div>
  92.     <div class=\"ui hidden divider\"></div>
  93.     ";
  94.             // line 18
  95.             echo $this->extensions['Sylius\Bundle\UiBundle\Twig\TemplateEventExtension']->render("sylius.shop.product.index.before_pagination", ["products" => twig_get_attribute($this->env$this->source, (isset($context["resources"]) || array_key_exists("resources"$context) ? $context["resources"] : (function () { throw new RuntimeError('Variable "resources" does not exist.'18$this->source); })()), "data", [], "any"falsefalsefalse18)]);
  96.             echo "
  97.     ";
  98.             // line 20
  99.             echo twig_call_macro($macros["pagination"], "macro_simple", [twig_get_attribute($this->env$this->source, (isset($context["resources"]) || array_key_exists("resources"$context) ? $context["resources"] : (function () { throw new RuntimeError('Variable "resources" does not exist.'20$this->source); })()), "data", [], "any"falsefalsefalse20)], 20$context$this->getSourceContext());
  100.             echo "
  101. ";
  102.         } else {
  103.             // line 22
  104.             echo "    ";
  105.             echo twig_call_macro($macros["messages"], "macro_info", ["sylius.ui.no_results_to_display"], 22$context$this->getSourceContext());
  106.             echo "
  107. ";
  108.         }
  109.         
  110.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  111.         
  112.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  113.     }
  114.     public function getTemplateName()
  115.     {
  116.         return "@SyliusShop/Product/Index/_main.html.twig";
  117.     }
  118.     public function isTraitable()
  119.     {
  120.         return false;
  121.     }
  122.     public function getDebugInfo()
  123.     {
  124.         return array (  118 => 22,  113 => 20,  108 => 18,  103 => 15,  89 => 14,  86 => 13,  69 => 12,  64 => 11,  62 => 10,  57 => 8,  50 => 4,  47 => 3,  45 => 2,  43 => 1,);
  125.     }
  126.     public function getSourceContext()
  127.     {
  128.         return new Source("{% import '@SyliusUi/Macro/messages.html.twig' as messages %}
  129. {% import '@SyliusUi/Macro/pagination.html.twig' as pagination %}
  130. {{ sylius_template_event('sylius.shop.product.index.search', _context) }}
  131. <div class=\"ui clearing hidden divider\"></div>
  132. {{ sylius_template_event('sylius.shop.product.index.before_list', {'products': resources.data}) }}
  133. {% if resources.data|length > 0 %}
  134.     <div class=\"ui three cards\" id=\"products\" {{ sylius_test_html_attribute('products') }}>
  135.         {% for product in resources.data %}
  136.             {% include '@SyliusShop/Product/_itemProduct.html.twig' %}
  137.         {% endfor %}
  138.     </div>
  139.     <div class=\"ui hidden divider\"></div>
  140.     {{ sylius_template_event('sylius.shop.product.index.before_pagination', {'products': resources.data}) }}
  141.     {{ pagination.simple(resources.data) }}
  142. {% else %}
  143.     {{ messages.info('sylius.ui.no_results_to_display') }}
  144. {% endif %}
  145. ""@SyliusShop/Product/Index/_main.html.twig""/var/www/html/templates/bundles/SyliusShopBundle/Product/Index/_main.html.twig");
  146.     }
  147. }