var/cache/dev_ha6cdf01c8a14124e315e8ec5e6f48dc2/twig/ae/ae961af89c8aa0060741e44aeeb66819339291d8d6521954ec2c85290285edcd.php line 68

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. /* @NetzpEvents6/storefront/layout/meta.html.twig */
  16. class __TwigTemplate_a06840d225abb98d26fa953c74079a78775034e81c554ec95c0c27c82efb77d6 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.             'layout_head_meta_tags_schema_webpage' => [$this'block_layout_head_meta_tags_schema_webpage'],
  26.             'events_meta' => [$this'block_events_meta'],
  27.         ];
  28.     }
  29.     protected function doGetParent(array $context)
  30.     {
  31.         // line 2
  32.         return "@Storefront/storefront/layout/meta.html.twig";
  33.     }
  34.     protected function doDisplay(array $context, array $blocks = [])
  35.     {
  36.         $macros $this->macros;
  37.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  38.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@NetzpEvents6/storefront/layout/meta.html.twig"));
  39.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  40.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@NetzpEvents6/storefront/layout/meta.html.twig"));
  41.         $context["event"] = null;
  42.         // line 3
  43.         if (sw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse3)) {
  44.             // line 4
  45.             $context["eventmain"] = sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse4), "extension", [=> "event"], "method"falsefalsefalse4);
  46.             // line 5
  47.             $context["eventparent"] = sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse5), "extension", [=> "eventparent"], "method"falsefalsefalse5);
  48.             // line 6
  49.             if (($context["eventmain"] ?? null)) {
  50.                 // line 7
  51.                 $context["event"] = ($context["eventmain"] ?? null);
  52.             } else {
  53.                 // line 9
  54.                 $context["event"] = ($context["eventparent"] ?? null);
  55.             }
  56.         }
  57.         // line 2
  58.         $this->parent $this->loadTemplate("@Storefront/storefront/layout/meta.html.twig""@NetzpEvents6/storefront/layout/meta.html.twig"2);
  59.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  60.         
  61.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  62.         
  63.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  64.     }
  65.     // line 13
  66.     public function block_layout_head_meta_tags_schema_webpage($context, array $blocks = [])
  67.     {
  68.         $macros $this->macros;
  69.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  70.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""layout_head_meta_tags_schema_webpage"));
  71.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  72.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""layout_head_meta_tags_schema_webpage"));
  73.         // line 14
  74.         echo "    ";
  75.         $this->displayParentBlock("layout_head_meta_tags_schema_webpage"$context$blocks);
  76.         echo "
  77.     ";
  78.         // line 16
  79.         $this->displayBlock('events_meta'$context$blocks);
  80.         
  81.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  82.         
  83.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  84.     }
  85.     public function block_events_meta($context, array $blocks = [])
  86.     {
  87.         $macros $this->macros;
  88.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  89.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""events_meta"));
  90.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  91.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""events_meta"));
  92.         // line 17
  93.         echo "        ";
  94.         if (((($context["event"] ?? null) && sw_get_attribute($this->env$this->source, ($context["event"] ?? null), "bookable", [], "any"falsefalsefalse17)) && (=== twig_compare(twig_length_filter($this->envsw_get_attribute($this->env$this->source, ($context["event"] ?? null), "slots", [], "any"falsefalsefalse17)), 0)))) {
  95.             // line 18
  96.             echo "            ";
  97.             $context["timeZone"] = (((sw_get_attribute($this->env$this->source, ($context["event"] ?? null), "timezone", [], "any"truetruefalse18) &&  !(null === sw_get_attribute($this->env$this->source, ($context["event"] ?? null), "timezone", [], "any"falsefalsefalse18)))) ? (sw_get_attribute($this->env$this->source, ($context["event"] ?? null), "timezone", [], "any"falsefalsefalse18)) : ("UTC"));
  98.             // line 19
  99.             echo "
  100.             <script type=\"application/ld+json\">
  101.             [
  102.             ";
  103.             // line 22
  104.             $context['_parent'] = $context;
  105.             $context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env$this->source, ($context["event"] ?? null), "slots", [], "any"falsefalsefalse22));
  106.             $context['loop'] = [
  107.               'parent' => $context['_parent'],
  108.               'index0' => 0,
  109.               'index'  => 1,
  110.               'first'  => true,
  111.             ];
  112.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  113.                 $length count($context['_seq']);
  114.                 $context['loop']['revindex0'] = $length 1;
  115.                 $context['loop']['revindex'] = $length;
  116.                 $context['loop']['length'] = $length;
  117.                 $context['loop']['last'] = === $length;
  118.             }
  119.             foreach ($context['_seq'] as $context["_key"] => $context["slot"]) {
  120.                 // line 23
  121.                 echo "
  122.                 {
  123.                     \"@context\": \"https://schema.org\",
  124.                     \"@type\": \"Event\",
  125.                     \"name\": \"";
  126.                 // line 27
  127.                 echo sw_escape_filter($this->envsw_get_attribute($this->env$this->source, ($context["event"] ?? null), "title", [], "any"falsefalsefalse27), "html"nulltrue);
  128.                 echo "\",
  129.                     \"description\": \"";
  130.                 // line 28
  131.                 echo sw_escape_filter($this->envsw_get_attribute($this->env$this->source, ($context["event"] ?? null), "description", [], "any"falsefalsefalse28), "html"nulltrue);
  132.                 echo "\",
  133.                     \"startDate\": \"";
  134.                 // line 29
  135.                 echo sw_escape_filter($this->envtwig_date_format_filter($this->envsw_get_attribute($this->env$this->source$context["slot"], "from", [], "any"falsefalsefalse29), "Y-m-d", ($context["timeZone"] ?? null)), "html"nulltrue);
  136.                 echo "T";
  137.                 echo sw_escape_filter($this->envtwig_date_format_filter($this->envsw_get_attribute($this->env$this->source$context["slot"], "from", [], "any"falsefalsefalse29), "H:i", ($context["timeZone"] ?? null)), "html"nulltrue);
  138.                 echo "\",
  139.                     \"endDate\": \"";
  140.                 // line 30
  141.                 echo sw_escape_filter($this->envtwig_date_format_filter($this->envsw_get_attribute($this->env$this->source$context["slot"], "until", [], "any"falsefalsefalse30), "Y-m-d", ($context["timeZone"] ?? null)), "html"nulltrue);
  142.                 echo "T";
  143.                 echo sw_escape_filter($this->envtwig_date_format_filter($this->envsw_get_attribute($this->env$this->source$context["slot"], "until", [], "any"falsefalsefalse30), "H:i", ($context["timeZone"] ?? null)), "html"nulltrue);
  144.                 echo "\",
  145.                     \"location\" : {
  146.                         \"name\": \"";
  147.                 // line 33
  148.                 echo sw_escape_filter($this->envsw_get_attribute($this->env$this->source$context["slot"], "location", [], "any"falsefalsefalse33), "html"nulltrue);
  149.                 echo "\",
  150.                         \"address\" : \"";
  151.                 // line 34
  152.                 echo sw_escape_filter($this->envsw_get_attribute($this->env$this->source$context["slot"], "address", [], "any"falsefalsefalse34), "html"nulltrue);
  153.                 echo "\"
  154.                     }
  155.                 }";
  156.                 // line 36
  157.                 if ( !sw_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsefalse36)) {
  158.                     echo ",";
  159.                 }
  160.                 // line 37
  161.                 echo "            ";
  162.                 ++$context['loop']['index0'];
  163.                 ++$context['loop']['index'];
  164.                 $context['loop']['first'] = false;
  165.                 if (isset($context['loop']['length'])) {
  166.                     --$context['loop']['revindex0'];
  167.                     --$context['loop']['revindex'];
  168.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  169.                 }
  170.             }
  171.             $_parent $context['_parent'];
  172.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['slot'], $context['_parent'], $context['loop']);
  173.             $context array_intersect_key($context$_parent) + $_parent;
  174.             // line 38
  175.             echo "
  176.             ]
  177.             </script>
  178.         ";
  179.         }
  180.         // line 42
  181.         echo "    ";
  182.         
  183.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  184.         
  185.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  186.     }
  187.     public function getTemplateName()
  188.     {
  189.         return "@NetzpEvents6/storefront/layout/meta.html.twig";
  190.     }
  191.     public function isTraitable()
  192.     {
  193.         return false;
  194.     }
  195.     public function getDebugInfo()
  196.     {
  197.         return array (  200 => 42,  194 => 38,  180 => 37,  176 => 36,  171 => 34,  167 => 33,  159 => 30,  153 => 29,  149 => 28,  145 => 27,  139 => 23,  122 => 22,  117 => 19,  114 => 18,  111 => 17,  92 => 16,  86 => 14,  76 => 13,  65 => 2,  61 => 9,  58 => 7,  56 => 6,  54 => 5,  52 => 4,  50 => 3,  36 => 2,);
  198.     }
  199.     public function getSourceContext()
  200.     {
  201.         return new Source("{% sw_extends '@Storefront/storefront/layout/meta.html.twig' %}
  202. {% set event = null %}
  203. {% if page.product %}
  204.     {% set eventmain = page.product.extension('event') %}
  205.     {% set eventparent = page.product.extension('eventparent') %}
  206.     {% if(eventmain) %}
  207.         {% set event = eventmain %}
  208.     {% else %}
  209.         {% set event = eventparent %}
  210.     {% endif %}
  211. {% endif %}
  212. {% block layout_head_meta_tags_schema_webpage %}
  213.     {{ parent() }}
  214.     {% block events_meta %}
  215.         {% if event and event.bookable and event.slots|length > 0 %}
  216.             {% set timeZone = event.timezone ?? 'UTC' %}
  217.             <script type=\"application/ld+json\">
  218.             [
  219.             {% for slot in event.slots %}
  220.                 {
  221.                     \"@context\": \"https://schema.org\",
  222.                     \"@type\": \"Event\",
  223.                     \"name\": \"{{ event.title }}\",
  224.                     \"description\": \"{{ event.description }}\",
  225.                     \"startDate\": \"{{ slot.from|date('Y-m-d', timezone=timeZone) }}T{{ slot.from|date('H:i', timezone=timeZone) }}\",
  226.                     \"endDate\": \"{{ slot.until|date('Y-m-d', timezone=timeZone) }}T{{ slot.until|date('H:i', timezone=timeZone) }}\",
  227.                     \"location\" : {
  228.                         \"name\": \"{{ slot.location }}\",
  229.                         \"address\" : \"{{ slot.address }}\"
  230.                     }
  231.                 }{% if not loop.last %},{% endif %}
  232.             {% endfor %}
  233.             ]
  234.             </script>
  235.         {% endif %}
  236.     {% endblock %}
  237. {% endblock %}
  238. ""@NetzpEvents6/storefront/layout/meta.html.twig""/var/customers/webs/youksakka/htdocs/custom/plugins/NetzpEvents6/src/Resources/views/storefront/layout/meta.html.twig");
  239.     }
  240. }