<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
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;
use Twig\TemplateWrapper;
/* @PumukitWebTV/Live/template.html.twig */
class __TwigTemplate_295bbc65f6bef27fcfcbff16017de776 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'body' => [$this, 'block_body'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return "@PumukitWebTV/layout.html.twig";
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$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", "@PumukitWebTV/Live/template.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@PumukitWebTV/Live/template.html.twig"));
// line 2
$context["title"] = $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Events");
// line 1
$this->parent = $this->load("@PumukitWebTV/layout.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 4
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_title(array $context, array $blocks = []): iterable
{
$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", "title"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
yield from $this->yieldParentBlock("title", $context, $blocks);
yield " - ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["title"]) || array_key_exists("title", $context) ? $context["title"] : (function () { throw new RuntimeError('Variable "title" does not exist.', 4, $this->source); })()), "html", null, true);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 6
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_body(array $context, array $blocks = []): iterable
{
$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", "body"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 7
yield " ";
yield from $this->load("@PumukitWebTV/Misc/page_title.html.twig", 7)->unwrap()->yield($context);
// line 8
yield "
";
// line 9
if (((Twig\Extension\CoreExtension::testEmpty((isset($context["eventsNow"]) || array_key_exists("eventsNow", $context) ? $context["eventsNow"] : (function () { throw new RuntimeError('Variable "eventsNow" does not exist.', 9, $this->source); })())) && Twig\Extension\CoreExtension::testEmpty((isset($context["eventsToday"]) || array_key_exists("eventsToday", $context) ? $context["eventsToday"] : (function () { throw new RuntimeError('Variable "eventsToday" does not exist.', 9, $this->source); })()))) && Twig\Extension\CoreExtension::testEmpty((isset($context["eventsFuture"]) || array_key_exists("eventsFuture", $context) ? $context["eventsFuture"] : (function () { throw new RuntimeError('Variable "eventsFuture" does not exist.', 9, $this->source); })())))) {
// line 10
yield " <div class=\"row\">
<div class=\"col-xs-12\" style=\"margin-top:20px;\">
<p>
";
// line 13
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("There are no scheduled live events. You will find ended live events in the series catalogue or through the media portal search.", [], "messages");
// line 16
yield " </p>
</div>
</div>
";
} else {
// line 20
yield "
";
// line 21
if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["eventsNow"]) || array_key_exists("eventsNow", $context) ? $context["eventsNow"] : (function () { throw new RuntimeError('Variable "eventsNow" does not exist.', 21, $this->source); })())) > 0)) {
// line 22
yield " <div class=\"row\">
<div class=\"col-xs-12\">
<ul>
<li class=\"categories_list\">
<div class=\"categories_list_block\">
<h2>";
// line 27
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Now events", [], "messages");
yield "</h2>
";
// line 28
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["eventsNow"]) || array_key_exists("eventsNow", $context) ? $context["eventsNow"] : (function () { throw new RuntimeError('Variable "eventsNow" does not exist.', 28, $this->source); })()));
$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["eventNow"]) {
// line 29
yield " ";
yield from $this->load("@PumukitWebTV/Resources/template_event.html.twig", 29)->unwrap()->yield(CoreExtension::merge($context, ["cols" => (isset($context["objectByCol"]) || array_key_exists("objectByCol", $context) ? $context["objectByCol"] : (function () { throw new RuntimeError('Variable "objectByCol" does not exist.', 29, $this->source); })()), "event" => CoreExtension::getAttribute($this->env, $this->source, $context["eventNow"], "data", [], "array", false, false, false, 29), "defaultPic" => (isset($context["defaultPic"]) || array_key_exists("defaultPic", $context) ? $context["defaultPic"] : (function () { throw new RuntimeError('Variable "defaultPic" does not exist.', 29, $this->source); })()), "active" => true]));
// line 30
yield " ";
yield from $this->load("@PumukitWebTV/Resources/template_clearfix.html.twig", 30)->unwrap()->yield($context);
// line 31
yield " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['eventNow'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 32
yield " </div>
<div class=\"clearfix\"></div>
</li>
</ul>
</div>
</div>
";
}
// line 39
yield "
";
// line 40
if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["eventsToday"]) || array_key_exists("eventsToday", $context) ? $context["eventsToday"] : (function () { throw new RuntimeError('Variable "eventsToday" does not exist.', 40, $this->source); })())) > 0)) {
// line 41
yield " <div class=\"row\">
<div class=\"col-xs-12\">
<ul>
<li class=\"categories_list\">
<div class=\"categories_list_block\">
<h2>";
// line 46
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Today events", [], "messages");
yield "</h2>
";
// line 47
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["eventsToday"]) || array_key_exists("eventsToday", $context) ? $context["eventsToday"] : (function () { throw new RuntimeError('Variable "eventsToday" does not exist.', 47, $this->source); })()));
$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["eventToday"]) {
// line 48
yield " ";
yield from $this->load("@PumukitWebTV/Resources/template_event.html.twig", 48)->unwrap()->yield(CoreExtension::merge($context, ["cols" => (isset($context["objectByCol"]) || array_key_exists("objectByCol", $context) ? $context["objectByCol"] : (function () { throw new RuntimeError('Variable "objectByCol" does not exist.', 48, $this->source); })()), "event" => CoreExtension::getAttribute($this->env, $this->source, $context["eventToday"], "data", [], "array", false, false, false, 48), "defaultPic" => (isset($context["defaultPic"]) || array_key_exists("defaultPic", $context) ? $context["defaultPic"] : (function () { throw new RuntimeError('Variable "defaultPic" does not exist.', 48, $this->source); })()), "active" => false]));
// line 49
yield " ";
yield from $this->load("@PumukitWebTV/Resources/template_clearfix.html.twig", 49)->unwrap()->yield($context);
// line 50
yield " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['eventToday'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 51
yield " </div>
<div class=\"clearfix\"></div>
</li>
</ul>
</div>
</div>
";
}
// line 58
yield "
";
// line 59
if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["eventsFuture"]) || array_key_exists("eventsFuture", $context) ? $context["eventsFuture"] : (function () { throw new RuntimeError('Variable "eventsFuture" does not exist.', 59, $this->source); })())) > 0)) {
// line 60
yield " <div class=\"row\">
<div class=\"col-xs-12\">
<ul>
<li class=\"categories_list\">
<div class=\"categories_list_block\">
<h2>";
// line 65
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Future events", [], "messages");
yield "</h2>
";
// line 66
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["eventsFuture"]) || array_key_exists("eventsFuture", $context) ? $context["eventsFuture"] : (function () { throw new RuntimeError('Variable "eventsFuture" does not exist.', 66, $this->source); })()));
$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["eventFuture"]) {
// line 67
yield " ";
yield from $this->load("@PumukitWebTV/Resources/template_event.html.twig", 67)->unwrap()->yield(CoreExtension::merge($context, ["cols" => (isset($context["objectByCol"]) || array_key_exists("objectByCol", $context) ? $context["objectByCol"] : (function () { throw new RuntimeError('Variable "objectByCol" does not exist.', 67, $this->source); })()), "event" => CoreExtension::getAttribute($this->env, $this->source, $context["eventFuture"], "data", [], "array", false, false, false, 67), "defaultPic" => (isset($context["defaultPic"]) || array_key_exists("defaultPic", $context) ? $context["defaultPic"] : (function () { throw new RuntimeError('Variable "defaultPic" does not exist.', 67, $this->source); })()), "active" => false]));
// line 68
yield " ";
yield from $this->load("@PumukitWebTV/Resources/template_clearfix.html.twig", 68)->unwrap()->yield($context);
// line 69
yield " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['eventFuture'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 70
yield " </div>
<div class=\"clearfix\"></div>
</li>
</ul>
</div>
<div class=\"col-xs-12 text-center\">
";
// line 76
yield $this->env->getRuntime('Pagerfanta\Twig\Extension\PagerfantaRuntime')->renderPagerfanta((isset($context["eventsFuture"]) || array_key_exists("eventsFuture", $context) ? $context["eventsFuture"] : (function () { throw new RuntimeError('Variable "eventsFuture" does not exist.', 76, $this->source); })()), "twitter_bootstrap3");
yield "
</div>
</div>
";
}
// line 80
yield "
";
}
// line 82
yield "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "@PumukitWebTV/Live/template.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 322 => 82, 318 => 80, 311 => 76, 303 => 70, 289 => 69, 286 => 68, 283 => 67, 266 => 66, 262 => 65, 255 => 60, 253 => 59, 250 => 58, 241 => 51, 227 => 50, 224 => 49, 221 => 48, 204 => 47, 200 => 46, 193 => 41, 191 => 40, 188 => 39, 179 => 32, 165 => 31, 162 => 30, 159 => 29, 142 => 28, 138 => 27, 131 => 22, 129 => 21, 126 => 20, 120 => 16, 118 => 13, 113 => 10, 111 => 9, 108 => 8, 105 => 7, 92 => 6, 67 => 4, 56 => 1, 54 => 2, 41 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% extends '@PumukitWebTV/layout.html.twig' %}
{% set title = \"Events\"|trans %}
{% block title %}{{ parent() }} - {{ title }}{% endblock %}
{% block body %}
{% include \"@PumukitWebTV/Misc/page_title.html.twig\" %}
{% if eventsNow is empty and eventsToday is empty and eventsFuture is empty %}
<div class=\"row\">
<div class=\"col-xs-12\" style=\"margin-top:20px;\">
<p>
{% trans %}
There are no scheduled live events. You will find ended live events in the series catalogue or through the media portal search.
{% endtrans %}
</p>
</div>
</div>
{% else %}
{% if eventsNow|length > 0 %}
<div class=\"row\">
<div class=\"col-xs-12\">
<ul>
<li class=\"categories_list\">
<div class=\"categories_list_block\">
<h2>{% trans %}Now events{% endtrans %}</h2>
{% for eventNow in eventsNow %}
{% include '@PumukitWebTV/Resources/template_event.html.twig' with {'cols': objectByCol, 'event': eventNow['data'], 'defaultPic' : defaultPic, active: true} %}
{% include \"@PumukitWebTV/Resources/template_clearfix.html.twig\" %}
{% endfor %}
</div>
<div class=\"clearfix\"></div>
</li>
</ul>
</div>
</div>
{% endif %}
{% if eventsToday|length > 0 %}
<div class=\"row\">
<div class=\"col-xs-12\">
<ul>
<li class=\"categories_list\">
<div class=\"categories_list_block\">
<h2>{% trans %}Today events{% endtrans %}</h2>
{% for eventToday in eventsToday %}
{% include '@PumukitWebTV/Resources/template_event.html.twig' with {'cols': objectByCol, 'event': eventToday['data'], 'defaultPic' : defaultPic, active: false} %}
{% include \"@PumukitWebTV/Resources/template_clearfix.html.twig\" %}
{% endfor %}
</div>
<div class=\"clearfix\"></div>
</li>
</ul>
</div>
</div>
{% endif %}
{% if eventsFuture|length > 0 %}
<div class=\"row\">
<div class=\"col-xs-12\">
<ul>
<li class=\"categories_list\">
<div class=\"categories_list_block\">
<h2>{% trans %}Future events{% endtrans %}</h2>
{% for eventFuture in eventsFuture %}
{% include '@PumukitWebTV/Resources/template_event.html.twig' with {'cols': objectByCol, 'event': eventFuture['data'], 'defaultPic' : defaultPic, active: false} %}
{% include \"@PumukitWebTV/Resources/template_clearfix.html.twig\" %}
{% endfor %}
</div>
<div class=\"clearfix\"></div>
</li>
</ul>
</div>
<div class=\"col-xs-12 text-center\">
{{ pagerfanta(eventsFuture, 'twitter_bootstrap3') }}
</div>
</div>
{% endif %}
{% endif %}
{% endblock %}
", "@PumukitWebTV/Live/template.html.twig", "/srv/pumukit/src/Pumukit/WebTVBundle/Resources/views/Live/template.html.twig");
}
}