<?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;
/* @HuebertSeoFaq/storefront/component/feature.html.twig */
class __TwigTemplate_8b277046175cdac7cf5dfaac60b46e8e extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'component_head_feature' => [$this, 'block_component_head_feature'],
'huebseo_faq_json' => [$this, 'block_huebseo_faq_json'],
];
}
protected function doGetParent(array $context)
{
// line 2
return "@Storefront/storefront/component/feature.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@HuebertSeoFaq/storefront/component/feature.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@HuebertSeoFaq/storefront/component/feature.html.twig"));
$this->parent = $this->loadTemplate("@Storefront/storefront/component/feature.html.twig", "@HuebertSeoFaq/storefront/component/feature.html.twig", 2);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function block_component_head_feature($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "component_head_feature"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "component_head_feature"));
// line 3
echo " ";
$this->displayParentBlock("component_head_feature", $context, $blocks);
echo "
";
// line 4
$this->displayBlock('huebseo_faq_json', $context, $blocks);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function block_huebseo_faq_json($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "huebseo_faq_json"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "huebseo_faq_json"));
// line 5
echo " ";
$context["faqElements"] = [];
// line 6
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "cmsPage", [], "any", false, false, false, 6), "sections", [], "any", false, false, false, 6), "elements", [], "any", false, false, false, 6));
foreach ($context['_seq'] as $context["_key"] => $context["defaultEntity"]) {
if ((sw_get_attribute($this->env, $this->source, $context["defaultEntity"], "type", [], "any", false, false, false, 6) == "default")) {
// line 7
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, $context["defaultEntity"], "blocks", [], "any", false, false, false, 7), "elements", [], "any", false, false, false, 7));
foreach ($context['_seq'] as $context["_key"] => $context["blockElement"]) {
// line 8
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, $context["blockElement"], "slots", [], "any", false, false, false, 8), "elements", [], "any", false, false, false, 8));
foreach ($context['_seq'] as $context["_key"] => $context["slotElement"]) {
if (((sw_get_attribute($this->env, $this->source, $context["slotElement"], "type", [], "any", false, false, false, 8) == "hueb-faq-element") && sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, $context["slotElement"], "config", [], "any", false, false, false, 8), "question", [], "any", false, false, false, 8), "value", [], "any", false, false, false, 8))) {
// line 9
echo " ";
$context["faqElements"] = twig_array_merge(($context["faqElements"] ?? null), sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, $context["slotElement"], "config", [], "any", false, false, false, 9), "question", [], "any", false, false, false, 9), "value", [], "any", false, false, false, 9));
// line 10
echo " ";
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['slotElement'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 11
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['blockElement'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 12
echo " ";
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['defaultEntity'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 13
echo " ";
if (($context["faqElements"] ?? null)) {
// line 14
echo " <script type=\"application/ld+json\">
{
\"@context\" : \"http://schema.org\",
\"@type\" : \"FAQPage\",
\"mainEntity\": [
";
// line 19
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(($context["faqElements"] ?? null));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["question"]) {
// line 20
echo " {
\"@type\": \"Question\",
\"name\": \"";
// line 22
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, $context["question"], "question", [], "any", false, false, false, 22), "html", null, true);
echo "\",
\"acceptedAnswer\": {
\"@type\": \"Answer\",
\"text\": \"";
// line 25
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, $context["question"], "answer", [], "any", false, false, false, 25), "html", null, true);
echo "\"
}
}";
// line 27
if ( !sw_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 27)) {
echo ",";
}
// line 28
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['question'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 29
echo " ]
}
</script>
";
}
// line 33
echo " ";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "@HuebertSeoFaq/storefront/component/feature.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 201 => 33, 195 => 29, 181 => 28, 177 => 27, 172 => 25, 166 => 22, 162 => 20, 145 => 19, 138 => 14, 135 => 13, 128 => 12, 122 => 11, 115 => 10, 112 => 9, 106 => 8, 101 => 7, 95 => 6, 92 => 5, 73 => 4, 68 => 3, 36 => 2,);
}
public function getSourceContext()
{
return new Source("{% sw_extends '@Storefront/storefront/component/feature.html.twig' %}
{% block component_head_feature %}
{{ parent() }}
{% block huebseo_faq_json %}
{% set faqElements = [] %}
{% for defaultEntity in page.cmsPage.sections.elements %}{% if defaultEntity.type == \"default\"%}
{% for blockElement in defaultEntity.blocks.elements %}
{% for slotElement in blockElement.slots.elements %}{% if slotElement.type == \"hueb-faq-element\" and slotElement.config.question.value %}
{% set faqElements = faqElements|merge(slotElement.config.question.value) %}
{% endif %}{% endfor %}
{% endfor %}
{% endif %}{% endfor %}
{% if faqElements %}
<script type=\"application/ld+json\">
{
\"@context\" : \"http://schema.org\",
\"@type\" : \"FAQPage\",
\"mainEntity\": [
{% for question in faqElements %}
{
\"@type\": \"Question\",
\"name\": \"{{ question.question }}\",
\"acceptedAnswer\": {
\"@type\": \"Answer\",
\"text\": \"{{ question.answer }}\"
}
}{% if not loop.last %},{% endif %}
{% endfor %}
]
}
</script>
{% endif %}
{% endblock %}
{% endblock %}
", "@HuebertSeoFaq/storefront/component/feature.html.twig", "/var/www/share/efb-elektronik.dev.mc.emzcustomers.de/shopware6/vendor/store.shopware.com/huebertseofaq/src/Resources/views/storefront/component/feature.html.twig");
}
}