<?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;
/* @NetzpEvents6/storefront/layout/meta.html.twig */
class __TwigTemplate_a06840d225abb98d26fa953c74079a78775034e81c554ec95c0c27c82efb77d6 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'layout_head_meta_tags_schema_webpage' => [$this, 'block_layout_head_meta_tags_schema_webpage'],
'events_meta' => [$this, 'block_events_meta'],
];
}
protected function doGetParent(array $context)
{
// line 2
return "@Storefront/storefront/layout/meta.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", "@NetzpEvents6/storefront/layout/meta.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@NetzpEvents6/storefront/layout/meta.html.twig"));
$context["event"] = null;
// line 3
if (sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 3)) {
// line 4
$context["eventmain"] = sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 4), "extension", [0 => "event"], "method", false, false, false, 4);
// line 5
$context["eventparent"] = sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 5), "extension", [0 => "eventparent"], "method", false, false, false, 5);
// line 6
if (($context["eventmain"] ?? null)) {
// line 7
$context["event"] = ($context["eventmain"] ?? null);
} else {
// line 9
$context["event"] = ($context["eventparent"] ?? null);
}
}
// line 2
$this->parent = $this->loadTemplate("@Storefront/storefront/layout/meta.html.twig", "@NetzpEvents6/storefront/layout/meta.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 13
public function block_layout_head_meta_tags_schema_webpage($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", "layout_head_meta_tags_schema_webpage"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "layout_head_meta_tags_schema_webpage"));
// line 14
echo " ";
$this->displayParentBlock("layout_head_meta_tags_schema_webpage", $context, $blocks);
echo "
";
// line 16
$this->displayBlock('events_meta', $context, $blocks);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function block_events_meta($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", "events_meta"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "events_meta"));
// line 17
echo " ";
if (((($context["event"] ?? null) && sw_get_attribute($this->env, $this->source, ($context["event"] ?? null), "bookable", [], "any", false, false, false, 17)) && (1 === twig_compare(twig_length_filter($this->env, sw_get_attribute($this->env, $this->source, ($context["event"] ?? null), "slots", [], "any", false, false, false, 17)), 0)))) {
// line 18
echo " ";
$context["timeZone"] = (((sw_get_attribute($this->env, $this->source, ($context["event"] ?? null), "timezone", [], "any", true, true, false, 18) && !(null === sw_get_attribute($this->env, $this->source, ($context["event"] ?? null), "timezone", [], "any", false, false, false, 18)))) ? (sw_get_attribute($this->env, $this->source, ($context["event"] ?? null), "timezone", [], "any", false, false, false, 18)) : ("UTC"));
// line 19
echo "
<script type=\"application/ld+json\">
[
";
// line 22
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env, $this->source, ($context["event"] ?? null), "slots", [], "any", false, false, false, 22));
$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["slot"]) {
// line 23
echo "
{
\"@context\": \"https://schema.org\",
\"@type\": \"Event\",
\"name\": \"";
// line 27
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, ($context["event"] ?? null), "title", [], "any", false, false, false, 27), "html", null, true);
echo "\",
\"description\": \"";
// line 28
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, ($context["event"] ?? null), "description", [], "any", false, false, false, 28), "html", null, true);
echo "\",
\"startDate\": \"";
// line 29
echo sw_escape_filter($this->env, twig_date_format_filter($this->env, sw_get_attribute($this->env, $this->source, $context["slot"], "from", [], "any", false, false, false, 29), "Y-m-d", ($context["timeZone"] ?? null)), "html", null, true);
echo "T";
echo sw_escape_filter($this->env, twig_date_format_filter($this->env, sw_get_attribute($this->env, $this->source, $context["slot"], "from", [], "any", false, false, false, 29), "H:i", ($context["timeZone"] ?? null)), "html", null, true);
echo "\",
\"endDate\": \"";
// line 30
echo sw_escape_filter($this->env, twig_date_format_filter($this->env, sw_get_attribute($this->env, $this->source, $context["slot"], "until", [], "any", false, false, false, 30), "Y-m-d", ($context["timeZone"] ?? null)), "html", null, true);
echo "T";
echo sw_escape_filter($this->env, twig_date_format_filter($this->env, sw_get_attribute($this->env, $this->source, $context["slot"], "until", [], "any", false, false, false, 30), "H:i", ($context["timeZone"] ?? null)), "html", null, true);
echo "\",
\"location\" : {
\"name\": \"";
// line 33
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, $context["slot"], "location", [], "any", false, false, false, 33), "html", null, true);
echo "\",
\"address\" : \"";
// line 34
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, $context["slot"], "address", [], "any", false, false, false, 34), "html", null, true);
echo "\"
}
}";
// line 36
if ( !sw_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 36)) {
echo ",";
}
// line 37
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['slot'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 38
echo "
]
</script>
";
}
// line 42
echo " ";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "@NetzpEvents6/storefront/layout/meta.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{% sw_extends '@Storefront/storefront/layout/meta.html.twig' %}
{% set event = null %}
{% if page.product %}
{% set eventmain = page.product.extension('event') %}
{% set eventparent = page.product.extension('eventparent') %}
{% if(eventmain) %}
{% set event = eventmain %}
{% else %}
{% set event = eventparent %}
{% endif %}
{% endif %}
{% block layout_head_meta_tags_schema_webpage %}
{{ parent() }}
{% block events_meta %}
{% if event and event.bookable and event.slots|length > 0 %}
{% set timeZone = event.timezone ?? 'UTC' %}
<script type=\"application/ld+json\">
[
{% for slot in event.slots %}
{
\"@context\": \"https://schema.org\",
\"@type\": \"Event\",
\"name\": \"{{ event.title }}\",
\"description\": \"{{ event.description }}\",
\"startDate\": \"{{ slot.from|date('Y-m-d', timezone=timeZone) }}T{{ slot.from|date('H:i', timezone=timeZone) }}\",
\"endDate\": \"{{ slot.until|date('Y-m-d', timezone=timeZone) }}T{{ slot.until|date('H:i', timezone=timeZone) }}\",
\"location\" : {
\"name\": \"{{ slot.location }}\",
\"address\" : \"{{ slot.address }}\"
}
}{% if not loop.last %},{% endif %}
{% endfor %}
]
</script>
{% endif %}
{% endblock %}
{% endblock %}
", "@NetzpEvents6/storefront/layout/meta.html.twig", "/var/customers/webs/youksakka/htdocs/custom/plugins/NetzpEvents6/src/Resources/views/storefront/layout/meta.html.twig");
}
}