var/cache/dev/twig/25/25c354c83c56abcd522bc04ae1836d60.php line 143

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/Taxon/_all_categories.html.twig */
  14. class __TwigTemplate_996e5b7c933204ae867dc426d4d87003 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/Taxon/_all_categories.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/Taxon/_all_categories.html.twig"));
  33.         // line 1
  34.         $context['_parent'] = $context;
  35.         $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["taxon"]) || array_key_exists("taxon"$context) ? $context["taxon"] : (function () { throw new RuntimeError('Variable "taxon" does not exist.'1$this->source); })()), "enabledChildren", [], "any"falsefalsefalse1));
  36.         $context['loop'] = [
  37.           'parent' => $context['_parent'],
  38.           'index0' => 0,
  39.           'index'  => 1,
  40.           'first'  => true,
  41.         ];
  42.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  43.             $length count($context['_seq']);
  44.             $context['loop']['revindex0'] = $length 1;
  45.             $context['loop']['revindex'] = $length;
  46.             $context['loop']['length'] = $length;
  47.             $context['loop']['last'] = === $length;
  48.         }
  49.         foreach ($context['_seq'] as $context["_key"] => $context["child"]) {
  50.             // line 2
  51.             echo "    ";
  52.             $context["taxonItemImage"] =  !twig_test_empty(twig_get_attribute($this->env$this->source$context["child"], "imagesByType", [=> "catalog"], "method"falsefalsefalse2));
  53.             // line 3
  54.             echo "    <div class=\"taxon-item row py-4";
  55.             if ( !twig_get_attribute($this->env$this->source$context["loop"], "first", [], "any"falsefalsefalse3)) {
  56.                 echo " mt-6";
  57.             }
  58.             if ((twig_get_attribute($this->env$this->source$context["loop"], "index", [], "any"falsefalsefalse3) % == 0)) {
  59.                 echo " bg-light";
  60.             }
  61.             echo "\">
  62.         ";
  63.             // line 4
  64.             if ((isset($context["taxonItemImage"]) || array_key_exists("taxonItemImage"$context) ? $context["taxonItemImage"] : (function () { throw new RuntimeError('Variable "taxonItemImage" does not exist.'4$this->source); })())) {
  65.                 // line 5
  66.                 echo "            <div class=\"taxon-item-img-wrap d-none d-lg-block col-lg-6 col-xxxxl-5 col-xxxxxl-4 ps-lg-4\">
  67.                 <a href=\"";
  68.                 // line 6
  69.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_product_index", ["slug" => ((twig_get_attribute($this->env$this->source$context["child"], "redirect", [], "any"falsefalsefalse6)) ? (twig_get_attribute($this->env$this->source$context["child"], "redirect", [], "any"falsefalsefalse6)) : (twig_get_attribute($this->env$this->source$context["child"], "slug", [], "any"falsefalsefalse6))), "_locale" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["child"], "translation", [], "any"falsefalsefalse6), "locale", [], "any"falsefalsefalse6)]), "html"nulltrue);
  70.                 echo "\">
  71.                     ";
  72.                 // line 8
  73.                 echo "                    ";
  74.                 // line 9
  75.                 echo "                    ";
  76.                 // line 10
  77.                 echo "                    ";
  78.                 // line 11
  79.                 echo "                    ";
  80.                 // line 12
  81.                 echo "                    <img class=\"lazy taxon-item-img\" width=\"100%\" src=\"";
  82.                 echo twig_escape_filter($this->env$this->extensions['Sylius\Bundle\CoreBundle\Twig\FilterExtension']->filter(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["child"], "imagesByType", [=> "catalog"], "method"falsefalsefalse12), "first", [], "any"falsefalsefalse12), "path", [], "any"falsefalsefalse12), "app_shop_taxon_catalog_desktop_small"), "html"nulltrue);
  83.                 echo "\" data-src=\"";
  84.                 echo twig_escape_filter($this->env$this->extensions['Sylius\Bundle\CoreBundle\Twig\FilterExtension']->filter(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["child"], "imagesByType", [=> "catalog"], "method"falsefalsefalse12), "first", [], "any"falsefalsefalse12), "path", [], "any"falsefalsefalse12), "app_shop_taxon_catalog_desktop"), "html"nulltrue);
  85.                 echo "\" alt=\"";
  86.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["child"], "name", [], "any"falsefalsefalse12), "html"nulltrue);
  87.                 echo "\">
  88.                 </a>
  89.             </div>
  90.         ";
  91.             }
  92.             // line 16
  93.             echo "        <div class=\"taxon-item-text d-flex flex-column justify-content-center col-lg-6 col-xxxxl-7 col-xxxxxl-8";
  94.             if ((twig_get_attribute($this->env$this->source$context["loop"], "index", [], "any"falsefalsefalse16) % != 0)) {
  95.                 echo " order-lg-first";
  96.             }
  97.             echo "\">
  98.             <div class=\"taxon-item-text-content";
  99.             // line 17
  100.             echo "\">
  101.                 <h2 class=\"taxon-item-title custom-display-7 mb-0 text-center d-flex flex-column justify-content-center text-lg-start\"
  102.                     onclick=\"window.location.href='";
  103.             // line 19
  104.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_product_index", ["slug" => ((twig_get_attribute($this->env$this->source$context["child"], "redirect", [], "any"falsefalsefalse19)) ? (twig_get_attribute($this->env$this->source$context["child"], "redirect", [], "any"falsefalsefalse19)) : (twig_get_attribute($this->env$this->source$context["child"], "slug", [], "any"falsefalsefalse19))), "_locale" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["child"], "translation", [], "any"falsefalsefalse19), "locale", [], "any"falsefalsefalse19)]), "html"nulltrue);
  105.             echo "'\"
  106.                     ";
  107.             // line 20
  108.             if ((isset($context["taxonItemImage"]) || array_key_exists("taxonItemImage"$context) ? $context["taxonItemImage"] : (function () { throw new RuntimeError('Variable "taxonItemImage" does not exist.'20$this->source); })())) {
  109.                 echo "style=\"background-image: url(";
  110.                 echo twig_escape_filter($this->env$this->extensions['Sylius\Bundle\CoreBundle\Twig\FilterExtension']->filter(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["child"], "imagesByType", [=> "catalog"], "method"falsefalsefalse20), "first", [], "any"falsefalsefalse20), "path", [], "any"falsefalsefalse20), "app_shop_taxon_catalog_mobile"), "html"nulltrue);
  111.                 echo ");\"";
  112.             }
  113.             // line 21
  114.             echo "                >
  115.                     <span class=\"taxon-item-title-text\">";
  116.             // line 22
  117.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["child"], "name", [], "any"falsefalsefalse22), "html"nulltrue);
  118.             echo "</span>
  119.                 </h2>
  120.                 ";
  121.             // line 24
  122.             if ( !twig_test_empty(twig_get_attribute($this->env$this->source$context["child"], "description", [], "any"falsefalsefalse24))) {
  123.                 // line 25
  124.                 echo "                    <div class=\"description fw-normal mt-3\">";
  125.                 echo twig_get_attribute($this->env$this->source$context["child"], "description", [], "any"falsefalsefalse25);
  126.                 echo "</div>
  127.                 ";
  128.             }
  129.             // line 27
  130.             echo "
  131.                 ";
  132.             // line 28
  133.             echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("app_shop_products_by_label_code_and_taxon_slug", ["labelCode" => "top_all_categories""taxonSlug" => ((twig_get_attribute($this->env$this->source,             // line 30
  134. $context["child"], "redirect", [], "any"falsefalsefalse30)) ? (twig_get_attribute($this->env$this->source$context["child"], "redirect", [], "any"falsefalsefalse30)) : (twig_get_attribute($this->env$this->source$context["child"], "slug", [], "any"falsefalsefalse30))), "count" => 20"template" => "@SyliusShop/Product/Box/_top_products_slider.html.twig"]));
  135.             // line 33
  136.             echo "
  137.             </div>
  138.         </div>
  139. ";
  140.             // line 40
  141.             echo "    </div>
  142. ";
  143.             ++$context['loop']['index0'];
  144.             ++$context['loop']['index'];
  145.             $context['loop']['first'] = false;
  146.             if (isset($context['loop']['length'])) {
  147.                 --$context['loop']['revindex0'];
  148.                 --$context['loop']['revindex'];
  149.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  150.             }
  151.         }
  152.         $_parent $context['_parent'];
  153.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['child'], $context['_parent'], $context['loop']);
  154.         $context array_intersect_key($context$_parent) + $_parent;
  155.         
  156.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  157.         
  158.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  159.     }
  160.     public function getTemplateName()
  161.     {
  162.         return "@SyliusShop/Taxon/_all_categories.html.twig";
  163.     }
  164.     public function isTraitable()
  165.     {
  166.         return false;
  167.     }
  168.     public function getDebugInfo()
  169.     {
  170.         return array (  151 => 40,  145 => 33,  143 => 30,  142 => 28,  139 => 27,  133 => 25,  131 => 24,  126 => 22,  123 => 21,  117 => 20,  113 => 19,  109 => 17,  102 => 16,  90 => 12,  88 => 11,  86 => 10,  84 => 9,  82 => 8,  78 => 6,  75 => 5,  73 => 4,  63 => 3,  60 => 2,  43 => 1,);
  171.     }
  172.     public function getSourceContext()
  173.     {
  174.         return new Source("{% for child in taxon.enabledChildren %}
  175.     {% set taxonItemImage = child.imagesByType('catalog') is not empty %}
  176.     <div class=\"taxon-item row py-4{% if not loop.first %} mt-6{% endif%}{% if loop.index is even %} bg-light{% endif %}\">
  177.         {% if taxonItemImage %}
  178.             <div class=\"taxon-item-img-wrap d-none d-lg-block col-lg-6 col-xxxxl-5 col-xxxxxl-4 ps-lg-4\">
  179.                 <a href=\"{{ path('sylius_shop_product_index', {'slug': child.redirect ?: child.slug, '_locale': child.translation.locale}) }}\">
  180.                     {#<picture>#}
  181.                     {#    <source srcset=\"{{ child.imagesByType('catalog').first.path|imagine_filter('app_shop_taxon_catalog_desktop') }}\" media=\"(min-width: 992px)\">#}
  182.                     {#    <source srcset=\"{{ child.imagesByType('catalog').first.path|imagine_filter('app_shop_taxon_catalog_mobile') }}\">#}
  183.                     {#    <img class=\"taxon-item-img\" src=\"{{ child.imagesByType('catalog').first.path|imagine_filter('app_shop_original') }}\" alt=\"{{ child.name }}\">#}
  184.                     {#</picture>#}
  185.                     <img class=\"lazy taxon-item-img\" width=\"100%\" src=\"{{ child.imagesByType('catalog').first.path|imagine_filter('app_shop_taxon_catalog_desktop_small') }}\" data-src=\"{{ child.imagesByType('catalog').first.path|imagine_filter('app_shop_taxon_catalog_desktop') }}\" alt=\"{{ child.name }}\">
  186.                 </a>
  187.             </div>
  188.         {% endif %}
  189.         <div class=\"taxon-item-text d-flex flex-column justify-content-center col-lg-6 col-xxxxl-7 col-xxxxxl-8{% if loop.index is odd %} order-lg-first{% endif %}\">
  190.             <div class=\"taxon-item-text-content{# p-4#}\">
  191.                 <h2 class=\"taxon-item-title custom-display-7 mb-0 text-center d-flex flex-column justify-content-center text-lg-start\"
  192.                     onclick=\"window.location.href='{{ path('sylius_shop_product_index', {'slug': child.redirect ?: child.slug, '_locale': child.translation.locale}) }}'\"
  193.                     {% if taxonItemImage %}style=\"background-image: url({{ child.imagesByType('catalog').first.path|imagine_filter('app_shop_taxon_catalog_mobile') }});\"{% endif %}
  194.                 >
  195.                     <span class=\"taxon-item-title-text\">{{ child.name }}</span>
  196.                 </h2>
  197.                 {% if child.description is not empty %}
  198.                     <div class=\"description fw-normal mt-3\">{{ child.description|raw }}</div>
  199.                 {% endif %}
  200.                 {{ render(url('app_shop_products_by_label_code_and_taxon_slug', {
  201.                     'labelCode': 'top_all_categories',
  202.                     'taxonSlug': child.redirect ?: child.slug,
  203.                     'count': 20,
  204.                     'template': '@SyliusShop/Product/Box/_top_products_slider.html.twig'
  205.                 })) }}
  206.             </div>
  207.         </div>
  208. {#        <div class=\"col-12 mt-4 text-end\">#}
  209. {#            <a class=\"btn btn-lg btn-outline-primary d-inline-flex align-items-center\" href=\"{{ path('sylius_shop_product_index', {'slug': child.slug, '_locale': child.translation.locale}) }}\">{{ 'app.ui.taxon.view'|trans }}<svg class=\"icon icon-xl bi-arrow-right-short ms-2\" viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\" focusable=\"false\" aria-hidden=\"true\"><path fill-rule=\"evenodd\" d=\"M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z\"/></svg></a>#}
  210. {#        </div>#}
  211.     </div>
  212. {% endfor %}
  213. ""@SyliusShop/Taxon/_all_categories.html.twig""/var/www/sudekusa-shop-test/themes/BootstrapChildTheme/SyliusShopBundle/views/Taxon/_all_categories.html.twig");
  214.     }
  215. }