var/cache/dev_h94b6c5d2d84092cf319e762d211cfdb3/twig/10/106c972561b9800d837366475bfd49dd55b2565660af942201e4e7f148a90a6f.php line 50

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use function Shopware\Core\Framework\Adapter\Twig\sw_get_attribute;
  4. use function Shopware\Core\Framework\Adapter\Twig\sw_escape_filter;
  5. use Twig\Error\LoaderError;
  6. use Twig\Error\RuntimeError;
  7. use Twig\Extension\SandboxExtension;
  8. use Twig\Markup;
  9. use Twig\Sandbox\SecurityError;
  10. use Twig\Sandbox\SecurityNotAllowedTagError;
  11. use Twig\Sandbox\SecurityNotAllowedFilterError;
  12. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  13. use Twig\Source;
  14. use Twig\Template;
  15. /* @MoorlFoundation/storefront/page/search/index.html.twig */
  16. class __TwigTemplate_3b90dcf1ecc4d3758f686a988521bc3ab5bac603a6cb98aba37e4798ed8ebe50 extends Template
  17. {
  18.     private $source;
  19.     private $macros = [];
  20.     public function __construct(Environment $env)
  21.     {
  22.         parent::__construct($env);
  23.         $this->source $this->getSourceContext();
  24.         $this->blocks = [
  25.             'page_search' => [$this'block_page_search'],
  26.         ];
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 2
  31.         return "@SwagPlatformSecurity/storefront/page/search/index.html.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@MoorlFoundation/storefront/page/search/index.html.twig"));
  38.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@MoorlFoundation/storefront/page/search/index.html.twig"));
  40.         $this->parent $this->loadTemplate("@SwagPlatformSecurity/storefront/page/search/index.html.twig""@MoorlFoundation/storefront/page/search/index.html.twig"2);
  41.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  42.         
  43.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  44.         
  45.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  46.     }
  47.     // line 3
  48.     public function block_page_search($context, array $blocks = [])
  49.     {
  50.         $macros $this->macros;
  51.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  52.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""page_search"));
  53.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  54.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""page_search"));
  55.         // line 4
  56.         echo "    ";
  57.         if ((sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "listing", [], "any"falsefalsefalse4), "moorlSearchResults", [], "any"falsefalsefalse4) && (twig_length_filter($this->envsw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "listing", [], "any"falsefalsefalse4), "moorlSearchResults", [], "any"falsefalsefalse4)) > 0))) {
  58.             // line 5
  59.             echo "        ";
  60.             // line 6
  61.             echo "        ";
  62.             $context["activeTab"] = "product";
  63.             // line 7
  64.             echo "        ";
  65.             $context["count"] = sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "listing", [], "any"falsefalsefalse7), "total", [], "any"falsefalsefalse7);
  66.             // line 8
  67.             echo "        ";
  68.             if (sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["app"] ?? null), "request", [], "any"falsefalsefalse8), "query", [], "any"falsefalsefalse8), "get", [=> "tab"], "method"falsefalsefalse8)) {
  69.                 // line 9
  70.                 echo "            ";
  71.                 $context["activeTab"] = sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["app"] ?? null), "request", [], "any"falsefalsefalse9), "query", [], "any"falsefalsefalse9), "get", [=> "tab"], "method"falsefalsefalse9);
  72.                 // line 10
  73.                 echo "        ";
  74.             }
  75.             // line 11
  76.             echo "        ";
  77.             $context['_parent'] = $context;
  78.             $context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "listing", [], "any"falsefalsefalse11), "moorlSearchResults", [], "any"falsefalsefalse11));
  79.             foreach ($context['_seq'] as $context["_key"] => $context["moorlSearchResult"]) {
  80.                 // line 12
  81.                 echo "            ";
  82.                 if ((sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source$context["moorlSearchResult"], "criteria", [], "any"falsefalsefalse12), "title", [], "any"falsefalsefalse12) == ($context["activeTab"] ?? null))) {
  83.                     // line 13
  84.                     echo "                ";
  85.                     $context["count"] = sw_get_attribute($this->env$this->source$context["moorlSearchResult"], "total", [], "any"falsefalsefalse13);
  86.                     // line 14
  87.                     echo "            ";
  88.                 }
  89.                 // line 15
  90.                 echo "        ";
  91.             }
  92.             $_parent $context['_parent'];
  93.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['moorlSearchResult'], $context['_parent'], $context['loop']);
  94.             $context array_intersect_key($context$_parent) + $_parent;
  95.             // line 16
  96.             echo "
  97.         <div class=\"cms-page search-page moorl-search-page\">
  98.             <h1 class=\"search-headline\">
  99.                 ";
  100.             // line 19
  101.             echo sw_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("moorl-foundation.search.headline", ["%count%" =>             // line 20
  102. ($context["count"] ?? null), "%searchTerm%" => sw_get_attribute($this->env$this->source,             // line 21
  103. ($context["page"] ?? null), "searchTerm", [], "any"falsefalsefalse21)]), "html"nulltrue);
  104.             // line 22
  105.             echo "
  106.             </h1>
  107.             <ul class=\"nav nav-tabs\">
  108.                 <li class=\"nav-item\">
  109.                     <a class=\"nav-link";
  110.             // line 27
  111.             if ((($context["activeTab"] ?? null) == "product")) {
  112.                 echo " active";
  113.             }
  114.             echo "\"
  115.                        href=\"";
  116.             // line 28
  117.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("frontend.search.page");
  118.             echo "?search=";
  119.             echo sw_escape_filter($this->envsw_get_attribute($this->env$this->source, ($context["page"] ?? null), "searchTerm", [], "any"falsefalsefalse28), "html"nulltrue);
  120.             echo "\">
  121.                         ";
  122.             // line 29
  123.             echo sw_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("moorl-foundation.search.product"), "html"nulltrue);
  124.             echo "
  125.                         <span class=\"badge badge-primary\">";
  126.             // line 30
  127.             echo sw_escape_filter($this->envsw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "listing", [], "any"falsefalsefalse30), "total", [], "any"falsefalsefalse30), "html"nulltrue);
  128.             echo "</span>
  129.                     </a>
  130.                 </li>
  131.                 ";
  132.             // line 34
  133.             $context['_parent'] = $context;
  134.             $context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "listing", [], "any"falsefalsefalse34), "moorlSearchResults", [], "any"falsefalsefalse34));
  135.             foreach ($context['_seq'] as $context["_key"] => $context["moorlSearchResult"]) {
  136.                 // line 35
  137.                 echo "                    <li class=\"nav-item\">
  138.                         <a href=\"";
  139.                 // line 36
  140.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("frontend.search.page");
  141.                 echo "?search=";
  142.                 echo sw_escape_filter($this->envsw_get_attribute($this->env$this->source, ($context["page"] ?? null), "searchTerm", [], "any"falsefalsefalse36), "html"nulltrue);
  143.                 echo "&tab=";
  144.                 echo sw_escape_filter($this->envsw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source$context["moorlSearchResult"], "criteria", [], "any"falsefalsefalse36), "title", [], "any"falsefalsefalse36), "html"nulltrue);
  145.                 echo "\"
  146.                            class=\"nav-link";
  147.                 // line 37
  148.                 if ((($context["activeTab"] ?? null) == sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source$context["moorlSearchResult"], "criteria", [], "any"falsefalsefalse37), "title", [], "any"falsefalsefalse37))) {
  149.                     echo " active";
  150.                 }
  151.                 echo "\">
  152.                             ";
  153.                 // line 38
  154.                 echo sw_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(sw_get_attribute($this->env$this->source$context["moorlSearchResult"], "snippet", [], "any"falsefalsefalse38)), "html"nulltrue);
  155.                 echo "
  156.                             <span class=\"badge badge-primary\">";
  157.                 // line 39
  158.                 echo sw_escape_filter($this->envsw_get_attribute($this->env$this->source$context["moorlSearchResult"], "total", [], "any"falsefalsefalse39), "html"nulltrue);
  159.                 echo "</span>
  160.                         </a>
  161.                     </li>
  162.                 ";
  163.             }
  164.             $_parent $context['_parent'];
  165.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['moorlSearchResult'], $context['_parent'], $context['loop']);
  166.             $context array_intersect_key($context$_parent) + $_parent;
  167.             // line 43
  168.             echo "            </ul>
  169.             <div class=\"tab-content\">
  170.                 ";
  171.             // line 47
  172.             echo "                ";
  173.             $this->loadTemplate("@MoorlFoundation/storefront/page/search/search-pagelet.html.twig""@MoorlFoundation/storefront/page/search/index.html.twig"47)->display($context);
  174.             // line 48
  175.             echo "            </div>
  176.         </div>
  177.     ";
  178.         } else {
  179.             // line 51
  180.             echo "        ";
  181.             // line 52
  182.             echo "        ";
  183.             $this->displayParentBlock("page_search"$context$blocks);
  184.             echo "
  185.     ";
  186.         }
  187.         
  188.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  189.         
  190.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  191.     }
  192.     public function getTemplateName()
  193.     {
  194.         return "@MoorlFoundation/storefront/page/search/index.html.twig";
  195.     }
  196.     public function isTraitable()
  197.     {
  198.         return false;
  199.     }
  200.     public function getDebugInfo()
  201.     {
  202.         return array (  197 => 52,  195 => 51,  190 => 48,  187 => 47,  182 => 43,  172 => 39,  168 => 38,  162 => 37,  154 => 36,  151 => 35,  147 => 34,  140 => 30,  136 => 29,  130 => 28,  124 => 27,  117 => 22,  115 => 21,  114 => 20,  113 => 19,  108 => 16,  102 => 15,  99 => 14,  96 => 13,  93 => 12,  88 => 11,  85 => 10,  82 => 9,  79 => 8,  76 => 7,  73 => 6,  71 => 5,  68 => 4,  58 => 3,  35 => 2,);
  203.     }
  204.     public function getSourceContext()
  205.     {
  206.         return new Source("{% sw_extends '@Storefront/storefront/page/search/index.html.twig' %}
  207. {% block page_search %}
  208.     {% if page.listing.moorlSearchResults and page.listing.moorlSearchResults|length > 0 %}
  209.         {# Has advanced search results - Load tabs #}
  210.         {% set activeTab = \"product\" %}
  211.         {% set count = page.listing.total %}
  212.         {% if app.request.query.get('tab') %}
  213.             {% set activeTab = app.request.query.get('tab') %}
  214.         {% endif %}
  215.         {% for moorlSearchResult in page.listing.moorlSearchResults %}
  216.             {% if moorlSearchResult.criteria.title == activeTab %}
  217.                 {% set count = moorlSearchResult.total %}
  218.             {% endif %}
  219.         {% endfor %}
  220.         <div class=\"cms-page search-page moorl-search-page\">
  221.             <h1 class=\"search-headline\">
  222.                 {{ \"moorl-foundation.search.headline\"|trans({
  223.                     '%count%': count,
  224.                     '%searchTerm%': page.searchTerm,
  225.                 }) }}
  226.             </h1>
  227.             <ul class=\"nav nav-tabs\">
  228.                 <li class=\"nav-item\">
  229.                     <a class=\"nav-link{% if activeTab == \"product\" %} active{% endif %}\"
  230.                        href=\"{{ path('frontend.search.page') }}?search={{ page.searchTerm }}\">
  231.                         {{ \"moorl-foundation.search.product\"|trans }}
  232.                         <span class=\"badge badge-primary\">{{ page.listing.total }}</span>
  233.                     </a>
  234.                 </li>
  235.                 {% for moorlSearchResult in page.listing.moorlSearchResults %}
  236.                     <li class=\"nav-item\">
  237.                         <a href=\"{{ path('frontend.search.page') }}?search={{ page.searchTerm }}&tab={{ moorlSearchResult.criteria.title }}\"
  238.                            class=\"nav-link{% if activeTab == moorlSearchResult.criteria.title %} active{% endif %}\">
  239.                             {{ moorlSearchResult.snippet|trans }}
  240.                             <span class=\"badge badge-primary\">{{ moorlSearchResult.total }}</span>
  241.                         </a>
  242.                     </li>
  243.                 {% endfor %}
  244.             </ul>
  245.             <div class=\"tab-content\">
  246.                 {# Search page #}
  247.                 {% sw_include '@Storefront/storefront/page/search/search-pagelet.html.twig' %}
  248.             </div>
  249.         </div>
  250.     {% else %}
  251.         {# Do nothing #}
  252.         {{ parent() }}
  253.     {% endif %}
  254. {% endblock %}
  255. ""@MoorlFoundation/storefront/page/search/index.html.twig""/srv/users/liamoriasw6/apps/liamoriasw6/custom/plugins/MoorlFoundation/src/Resources/views/storefront/page/search/index.html.twig");
  256.     }
  257. }