<?php
use Twig\Environment;
use function Shopware\Core\Framework\Adapter\Twig\sw_get_attribute;
use function Shopware\Core\Framework\Adapter\Twig\sw_escape_filter;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @MoorlFoundation/storefront/page/search/index.html.twig */
class __TwigTemplate_3b90dcf1ecc4d3758f686a988521bc3ab5bac603a6cb98aba37e4798ed8ebe50 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'page_search' => [$this, 'block_page_search'],
];
}
protected function doGetParent(array $context)
{
// line 2
return "@SwagPlatformSecurity/storefront/page/search/index.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@MoorlFoundation/storefront/page/search/index.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@MoorlFoundation/storefront/page/search/index.html.twig"));
$this->parent = $this->loadTemplate("@SwagPlatformSecurity/storefront/page/search/index.html.twig", "@MoorlFoundation/storefront/page/search/index.html.twig", 2);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 3
public function block_page_search($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "page_search"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "page_search"));
// line 4
echo " ";
if ((sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "listing", [], "any", false, false, false, 4), "moorlSearchResults", [], "any", false, false, false, 4) && (twig_length_filter($this->env, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "listing", [], "any", false, false, false, 4), "moorlSearchResults", [], "any", false, false, false, 4)) > 0))) {
// line 5
echo " ";
// line 6
echo " ";
$context["activeTab"] = "product";
// line 7
echo " ";
$context["count"] = sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "listing", [], "any", false, false, false, 7), "total", [], "any", false, false, false, 7);
// line 8
echo " ";
if (sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["app"] ?? null), "request", [], "any", false, false, false, 8), "query", [], "any", false, false, false, 8), "get", [0 => "tab"], "method", false, false, false, 8)) {
// line 9
echo " ";
$context["activeTab"] = sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["app"] ?? null), "request", [], "any", false, false, false, 9), "query", [], "any", false, false, false, 9), "get", [0 => "tab"], "method", false, false, false, 9);
// line 10
echo " ";
}
// line 11
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "listing", [], "any", false, false, false, 11), "moorlSearchResults", [], "any", false, false, false, 11));
foreach ($context['_seq'] as $context["_key"] => $context["moorlSearchResult"]) {
// line 12
echo " ";
if ((sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, $context["moorlSearchResult"], "criteria", [], "any", false, false, false, 12), "title", [], "any", false, false, false, 12) == ($context["activeTab"] ?? null))) {
// line 13
echo " ";
$context["count"] = sw_get_attribute($this->env, $this->source, $context["moorlSearchResult"], "total", [], "any", false, false, false, 13);
// line 14
echo " ";
}
// line 15
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['moorlSearchResult'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 16
echo "
<div class=\"cms-page search-page moorl-search-page\">
<h1 class=\"search-headline\">
";
// line 19
echo sw_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("moorl-foundation.search.headline", ["%count%" => // line 20
($context["count"] ?? null), "%searchTerm%" => sw_get_attribute($this->env, $this->source, // line 21
($context["page"] ?? null), "searchTerm", [], "any", false, false, false, 21)]), "html", null, true);
// line 22
echo "
</h1>
<ul class=\"nav nav-tabs\">
<li class=\"nav-item\">
<a class=\"nav-link";
// line 27
if ((($context["activeTab"] ?? null) == "product")) {
echo " active";
}
echo "\"
href=\"";
// line 28
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("frontend.search.page");
echo "?search=";
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "searchTerm", [], "any", false, false, false, 28), "html", null, true);
echo "\">
";
// line 29
echo sw_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("moorl-foundation.search.product"), "html", null, true);
echo "
<span class=\"badge badge-primary\">";
// line 30
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "listing", [], "any", false, false, false, 30), "total", [], "any", false, false, false, 30), "html", null, true);
echo "</span>
</a>
</li>
";
// line 34
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "listing", [], "any", false, false, false, 34), "moorlSearchResults", [], "any", false, false, false, 34));
foreach ($context['_seq'] as $context["_key"] => $context["moorlSearchResult"]) {
// line 35
echo " <li class=\"nav-item\">
<a href=\"";
// line 36
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("frontend.search.page");
echo "?search=";
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "searchTerm", [], "any", false, false, false, 36), "html", null, true);
echo "&tab=";
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, $context["moorlSearchResult"], "criteria", [], "any", false, false, false, 36), "title", [], "any", false, false, false, 36), "html", null, true);
echo "\"
class=\"nav-link";
// line 37
if ((($context["activeTab"] ?? null) == sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, $context["moorlSearchResult"], "criteria", [], "any", false, false, false, 37), "title", [], "any", false, false, false, 37))) {
echo " active";
}
echo "\">
";
// line 38
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", false, false, false, 38)), "html", null, true);
echo "
<span class=\"badge badge-primary\">";
// line 39
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, $context["moorlSearchResult"], "total", [], "any", false, false, false, 39), "html", null, true);
echo "</span>
</a>
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['moorlSearchResult'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 43
echo " </ul>
<div class=\"tab-content\">
";
// line 47
echo " ";
$this->loadTemplate("@MoorlFoundation/storefront/page/search/search-pagelet.html.twig", "@MoorlFoundation/storefront/page/search/index.html.twig", 47)->display($context);
// line 48
echo " </div>
</div>
";
} else {
// line 51
echo " ";
// line 52
echo " ";
$this->displayParentBlock("page_search", $context, $blocks);
echo "
";
}
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "@MoorlFoundation/storefront/page/search/index.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{% sw_extends '@Storefront/storefront/page/search/index.html.twig' %}
{% block page_search %}
{% if page.listing.moorlSearchResults and page.listing.moorlSearchResults|length > 0 %}
{# Has advanced search results - Load tabs #}
{% set activeTab = \"product\" %}
{% set count = page.listing.total %}
{% if app.request.query.get('tab') %}
{% set activeTab = app.request.query.get('tab') %}
{% endif %}
{% for moorlSearchResult in page.listing.moorlSearchResults %}
{% if moorlSearchResult.criteria.title == activeTab %}
{% set count = moorlSearchResult.total %}
{% endif %}
{% endfor %}
<div class=\"cms-page search-page moorl-search-page\">
<h1 class=\"search-headline\">
{{ \"moorl-foundation.search.headline\"|trans({
'%count%': count,
'%searchTerm%': page.searchTerm,
}) }}
</h1>
<ul class=\"nav nav-tabs\">
<li class=\"nav-item\">
<a class=\"nav-link{% if activeTab == \"product\" %} active{% endif %}\"
href=\"{{ path('frontend.search.page') }}?search={{ page.searchTerm }}\">
{{ \"moorl-foundation.search.product\"|trans }}
<span class=\"badge badge-primary\">{{ page.listing.total }}</span>
</a>
</li>
{% for moorlSearchResult in page.listing.moorlSearchResults %}
<li class=\"nav-item\">
<a href=\"{{ path('frontend.search.page') }}?search={{ page.searchTerm }}&tab={{ moorlSearchResult.criteria.title }}\"
class=\"nav-link{% if activeTab == moorlSearchResult.criteria.title %} active{% endif %}\">
{{ moorlSearchResult.snippet|trans }}
<span class=\"badge badge-primary\">{{ moorlSearchResult.total }}</span>
</a>
</li>
{% endfor %}
</ul>
<div class=\"tab-content\">
{# Search page #}
{% sw_include '@Storefront/storefront/page/search/search-pagelet.html.twig' %}
</div>
</div>
{% else %}
{# Do nothing #}
{{ parent() }}
{% endif %}
{% endblock %}
", "@MoorlFoundation/storefront/page/search/index.html.twig", "/srv/users/liamoriasw6/apps/liamoriasw6/custom/plugins/MoorlFoundation/src/Resources/views/storefront/page/search/index.html.twig");
}
}