var/cache/dev_hc896b0aecebc6aae6bec469c82cd525f/twig/17/174a4b879fcb918d0a1f6c2d4453d714fe052ac432cf0a9ab9b267bd401fdaff.php line 60

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. /* @HuebertSeoFaq/storefront/component/feature.html.twig */
  16. class __TwigTemplate_8b277046175cdac7cf5dfaac60b46e8e 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.             'component_head_feature' => [$this'block_component_head_feature'],
  26.             'huebseo_faq_json' => [$this'block_huebseo_faq_json'],
  27.         ];
  28.     }
  29.     protected function doGetParent(array $context)
  30.     {
  31.         // line 2
  32.         return "@Storefront/storefront/component/feature.html.twig";
  33.     }
  34.     protected function doDisplay(array $context, array $blocks = [])
  35.     {
  36.         $macros $this->macros;
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  38.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@HuebertSeoFaq/storefront/component/feature.html.twig"));
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  40.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@HuebertSeoFaq/storefront/component/feature.html.twig"));
  41.         $this->parent $this->loadTemplate("@Storefront/storefront/component/feature.html.twig""@HuebertSeoFaq/storefront/component/feature.html.twig"2);
  42.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  43.         
  44.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  45.         
  46.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  47.     }
  48.     public function block_component_head_feature($context, array $blocks = [])
  49.     {
  50.         $macros $this->macros;
  51.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  52.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""component_head_feature"));
  53.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  54.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""component_head_feature"));
  55.         // line 3
  56.         echo "    ";
  57.         $this->displayParentBlock("component_head_feature"$context$blocks);
  58.         echo "
  59.     ";
  60.         // line 4
  61.         $this->displayBlock('huebseo_faq_json'$context$blocks);
  62.         
  63.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  64.         
  65.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  66.     }
  67.     public function block_huebseo_faq_json($context, array $blocks = [])
  68.     {
  69.         $macros $this->macros;
  70.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  71.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""huebseo_faq_json"));
  72.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  73.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""huebseo_faq_json"));
  74.         // line 5
  75.         echo "        ";
  76.         $context["faqElements"] = [];
  77.         // line 6
  78.         echo "        ";
  79.         $context['_parent'] = $context;
  80.         $context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "cmsPage", [], "any"falsefalsefalse6), "sections", [], "any"falsefalsefalse6), "elements", [], "any"falsefalsefalse6));
  81.         foreach ($context['_seq'] as $context["_key"] => $context["defaultEntity"]) {
  82.             if ((sw_get_attribute($this->env$this->source$context["defaultEntity"], "type", [], "any"falsefalsefalse6) == "default")) {
  83.                 // line 7
  84.                 echo "            ";
  85.                 $context['_parent'] = $context;
  86.                 $context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source$context["defaultEntity"], "blocks", [], "any"falsefalsefalse7), "elements", [], "any"falsefalsefalse7));
  87.                 foreach ($context['_seq'] as $context["_key"] => $context["blockElement"]) {
  88.                     // line 8
  89.                     echo "                ";
  90.                     $context['_parent'] = $context;
  91.                     $context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source$context["blockElement"], "slots", [], "any"falsefalsefalse8), "elements", [], "any"falsefalsefalse8));
  92.                     foreach ($context['_seq'] as $context["_key"] => $context["slotElement"]) {
  93.                         if (((sw_get_attribute($this->env$this->source$context["slotElement"], "type", [], "any"falsefalsefalse8) == "hueb-faq-element") && sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source$context["slotElement"], "config", [], "any"falsefalsefalse8), "question", [], "any"falsefalsefalse8), "value", [], "any"falsefalsefalse8))) {
  94.                             // line 9
  95.                             echo "                    ";
  96.                             $context["faqElements"] = twig_array_merge(($context["faqElements"] ?? null), sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source$context["slotElement"], "config", [], "any"falsefalsefalse9), "question", [], "any"falsefalsefalse9), "value", [], "any"falsefalsefalse9));
  97.                             // line 10
  98.                             echo "                ";
  99.                         }
  100.                     }
  101.                     $_parent $context['_parent'];
  102.                     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['slotElement'], $context['_parent'], $context['loop']);
  103.                     $context array_intersect_key($context$_parent) + $_parent;
  104.                     // line 11
  105.                     echo "            ";
  106.                 }
  107.                 $_parent $context['_parent'];
  108.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['blockElement'], $context['_parent'], $context['loop']);
  109.                 $context array_intersect_key($context$_parent) + $_parent;
  110.                 // line 12
  111.                 echo "        ";
  112.             }
  113.         }
  114.         $_parent $context['_parent'];
  115.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['defaultEntity'], $context['_parent'], $context['loop']);
  116.         $context array_intersect_key($context$_parent) + $_parent;
  117.         // line 13
  118.         echo "        ";
  119.         if (($context["faqElements"] ?? null)) {
  120.             // line 14
  121.             echo "            <script type=\"application/ld+json\">
  122.                 {
  123.                     \"@context\" : \"http://schema.org\",
  124.                     \"@type\" : \"FAQPage\",
  125.                     \"mainEntity\": [
  126.                     ";
  127.             // line 19
  128.             $context['_parent'] = $context;
  129.             $context['_seq'] = twig_ensure_traversable(($context["faqElements"] ?? null));
  130.             $context['loop'] = [
  131.               'parent' => $context['_parent'],
  132.               'index0' => 0,
  133.               'index'  => 1,
  134.               'first'  => true,
  135.             ];
  136.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  137.                 $length count($context['_seq']);
  138.                 $context['loop']['revindex0'] = $length 1;
  139.                 $context['loop']['revindex'] = $length;
  140.                 $context['loop']['length'] = $length;
  141.                 $context['loop']['last'] = === $length;
  142.             }
  143.             foreach ($context['_seq'] as $context["_key"] => $context["question"]) {
  144.                 // line 20
  145.                 echo "                    {
  146.                         \"@type\": \"Question\",
  147.                         \"name\": \"";
  148.                 // line 22
  149.                 echo sw_escape_filter($this->envsw_get_attribute($this->env$this->source$context["question"], "question", [], "any"falsefalsefalse22), "html"nulltrue);
  150.                 echo "\",
  151.                         \"acceptedAnswer\": {
  152.                             \"@type\": \"Answer\",
  153.                             \"text\": \"";
  154.                 // line 25
  155.                 echo sw_escape_filter($this->envsw_get_attribute($this->env$this->source$context["question"], "answer", [], "any"falsefalsefalse25), "html"nulltrue);
  156.                 echo "\"
  157.                             }
  158.                     }";
  159.                 // line 27
  160.                 if ( !sw_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsefalse27)) {
  161.                     echo ",";
  162.                 }
  163.                 // line 28
  164.                 echo "                ";
  165.                 ++$context['loop']['index0'];
  166.                 ++$context['loop']['index'];
  167.                 $context['loop']['first'] = false;
  168.                 if (isset($context['loop']['length'])) {
  169.                     --$context['loop']['revindex0'];
  170.                     --$context['loop']['revindex'];
  171.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  172.                 }
  173.             }
  174.             $_parent $context['_parent'];
  175.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['question'], $context['_parent'], $context['loop']);
  176.             $context array_intersect_key($context$_parent) + $_parent;
  177.             // line 29
  178.             echo "                    ]
  179.                 }
  180.             </script>
  181.         ";
  182.         }
  183.         // line 33
  184.         echo "    ";
  185.         
  186.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  187.         
  188.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  189.     }
  190.     public function getTemplateName()
  191.     {
  192.         return "@HuebertSeoFaq/storefront/component/feature.html.twig";
  193.     }
  194.     public function isTraitable()
  195.     {
  196.         return false;
  197.     }
  198.     public function getDebugInfo()
  199.     {
  200.         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,);
  201.     }
  202.     public function getSourceContext()
  203.     {
  204.         return new Source("{% sw_extends '@Storefront/storefront/component/feature.html.twig' %}
  205. {% block component_head_feature %}
  206.     {{ parent() }}
  207.     {% block huebseo_faq_json %}
  208.         {% set faqElements = [] %}
  209.         {% for defaultEntity in page.cmsPage.sections.elements %}{% if defaultEntity.type == \"default\"%}
  210.             {% for blockElement in defaultEntity.blocks.elements %}
  211.                 {% for slotElement in blockElement.slots.elements %}{% if slotElement.type == \"hueb-faq-element\" and slotElement.config.question.value %}
  212.                     {% set faqElements = faqElements|merge(slotElement.config.question.value) %}
  213.                 {% endif %}{% endfor %}
  214.             {% endfor %}
  215.         {% endif %}{% endfor %}
  216.         {% if faqElements %}
  217.             <script type=\"application/ld+json\">
  218.                 {
  219.                     \"@context\" : \"http://schema.org\",
  220.                     \"@type\" : \"FAQPage\",
  221.                     \"mainEntity\": [
  222.                     {% for question in faqElements %}
  223.                     {
  224.                         \"@type\": \"Question\",
  225.                         \"name\": \"{{ question.question }}\",
  226.                         \"acceptedAnswer\": {
  227.                             \"@type\": \"Answer\",
  228.                             \"text\": \"{{ question.answer }}\"
  229.                             }
  230.                     }{% if not loop.last %},{% endif %}
  231.                 {% endfor %}
  232.                     ]
  233.                 }
  234.             </script>
  235.         {% endif %}
  236.     {% endblock %}
  237. {% endblock %}
  238. ""@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");
  239.     }
  240. }