<?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/Modules/widget_media.html.twig */
class __TwigTemplate_9190e2fea771c40473a866ce41b30e73 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->parent = false;
$this->blocks = [
];
}
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/Modules/widget_media.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/Modules/widget_media.html.twig"));
// line 1
$context["selected_design"] = ((array_key_exists("design", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["design"]) || array_key_exists("design", $context) ? $context["design"] : (function () { throw new RuntimeError('Variable "design" does not exist.', 1, $this->source); })()), "horizontal")) : ("horizontal"));
// line 2
$context["textShowMore"] = $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Show more");
// line 3
yield "
";
// line 4
if (((isset($context["objects"]) || array_key_exists("objects", $context) ? $context["objects"] : (function () { throw new RuntimeError('Variable "objects" does not exist.', 4, $this->source); })()) && ((isset($context["selected_design"]) || array_key_exists("selected_design", $context) ? $context["selected_design"] : (function () { throw new RuntimeError('Variable "selected_design" does not exist.', 4, $this->source); })()) == "horizontal"))) {
// line 5
yield " <div class=\"block-media-pmk ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["class"]) || array_key_exists("class", $context) ? $context["class"] : (function () { throw new RuntimeError('Variable "class" does not exist.', 5, $this->source); })()), "html", null, true);
yield "\">
";
// line 6
yield from $this->load("@PumukitWebTV/Resources/template_widget_title.html.twig", 6)->unwrap()->yield($context);
// line 7
yield " <div class=\"row\">
";
// line 8
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["objects"]) || array_key_exists("objects", $context) ? $context["objects"] : (function () { throw new RuntimeError('Variable "objects" does not exist.', 8, $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["object"]) {
// line 9
yield " ";
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["object"], "isCollection", [], "method", false, false, false, 9)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 10
yield " ";
yield from $this->load("@PumukitWebTV/Resources/template_series.html.twig", 10)->unwrap()->yield($context);
// line 11
yield " ";
} else {
// line 12
yield " ";
yield from $this->load("@PumukitWebTV/Resources/template_video.html.twig", 12)->unwrap()->yield($context);
// line 13
yield " ";
}
// line 14
yield " ";
yield from $this->load("@PumukitWebTV/Resources/template_clearfix.html.twig", 14)->unwrap()->yield($context);
// line 15
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['object'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 16
yield "
";
// line 17
if ((($tmp = ((array_key_exists("show_more", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["show_more"]) || array_key_exists("show_more", $context) ? $context["show_more"] : (function () { throw new RuntimeError('Variable "show_more" does not exist.', 17, $this->source); })()), false)) : (false))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 18
yield " ";
yield from $this->load("@PumukitWebTV/Misc/show_more.html.twig", 18)->unwrap()->yield($context);
// line 19
yield " ";
}
// line 20
yield " ";
if ((($tmp = ((array_key_exists("show_link", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["show_link"]) || array_key_exists("show_link", $context) ? $context["show_link"] : (function () { throw new RuntimeError('Variable "show_link" does not exist.', 20, $this->source); })()), false)) : (false))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 21
yield " <div class=\"col-xs-12 text-right\">
<a href=\"";
// line 22
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath((isset($context["show_link"]) || array_key_exists("show_link", $context) ? $context["show_link"] : (function () { throw new RuntimeError('Variable "show_link" does not exist.', 22, $this->source); })()));
yield "\" class=\"show_more_link\" title=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["textShowMore"]) || array_key_exists("textShowMore", $context) ? $context["textShowMore"] : (function () { throw new RuntimeError('Variable "textShowMore" does not exist.', 22, $this->source); })()), "html", null, true);
yield "\">
<p>";
// line 23
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["textShowMore"]) || array_key_exists("textShowMore", $context) ? $context["textShowMore"] : (function () { throw new RuntimeError('Variable "textShowMore" does not exist.', 23, $this->source); })()), "html", null, true);
yield "...</p>
</a>
</div>
";
}
// line 27
yield " </div>
</div>
";
} elseif (( // line 29
(isset($context["objects"]) || array_key_exists("objects", $context) ? $context["objects"] : (function () { throw new RuntimeError('Variable "objects" does not exist.', 29, $this->source); })()) && ((isset($context["selected_design"]) || array_key_exists("selected_design", $context) ? $context["selected_design"] : (function () { throw new RuntimeError('Variable "selected_design" does not exist.', 29, $this->source); })()) == "vertical"))) {
// line 30
yield " <div class=\"block-media-pmk ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["class"]) || array_key_exists("class", $context) ? $context["class"] : (function () { throw new RuntimeError('Variable "class" does not exist.', 30, $this->source); })()), "html", null, true);
yield "\">
";
// line 31
yield from $this->load("@PumukitWebTV/Resources/template_widget_title.html.twig", 31)->unwrap()->yield($context);
// line 32
yield " <div class=\"row\">
";
// line 33
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["objects"]) || array_key_exists("objects", $context) ? $context["objects"] : (function () { throw new RuntimeError('Variable "objects" does not exist.', 33, $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["object"]) {
// line 34
yield " ";
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["object"], "isCollection", [], "method", false, false, false, 34)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 35
yield " ";
yield from $this->load("@PumukitWebTV/Resources/template_series_old.html.twig", 35)->unwrap()->yield($context);
// line 36
yield " ";
} else {
// line 37
yield " ";
yield from $this->load("@PumukitWebTV/Resources/template_video_legacy.html.twig", 37)->unwrap()->yield($context);
// line 38
yield " ";
}
// line 39
yield " <div class=\"clearfix\"></div>
";
++$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['object'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 41
yield " </div>
</div>
";
}
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "@PumukitWebTV/Modules/widget_media.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 209 => 41, 194 => 39, 191 => 38, 188 => 37, 185 => 36, 182 => 35, 179 => 34, 162 => 33, 159 => 32, 157 => 31, 152 => 30, 150 => 29, 146 => 27, 139 => 23, 133 => 22, 130 => 21, 127 => 20, 124 => 19, 121 => 18, 119 => 17, 116 => 16, 102 => 15, 99 => 14, 96 => 13, 93 => 12, 90 => 11, 87 => 10, 84 => 9, 67 => 8, 64 => 7, 62 => 6, 57 => 5, 55 => 4, 52 => 3, 50 => 2, 48 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% set selected_design = design|default('horizontal') %}
{% set textShowMore = \"Show more\"|trans %}
{% if objects and selected_design == 'horizontal' %}
<div class=\"block-media-pmk {{ class }}\">
{% include \"@PumukitWebTV/Resources/template_widget_title.html.twig\" %}
<div class=\"row\">
{% for object in objects %}
{% if object.isCollection() %}
{% include '@PumukitWebTV/Resources/template_series.html.twig' %}
{% else %}
{% include '@PumukitWebTV/Resources/template_video.html.twig' %}
{% endif %}
{% include \"@PumukitWebTV/Resources/template_clearfix.html.twig\" %}
{% endfor %}
{% if show_more|default(false) %}
{% include '@PumukitWebTV/Misc/show_more.html.twig' %}
{% endif %}
{% if show_link|default(false) %}
<div class=\"col-xs-12 text-right\">
<a href=\"{{ path(show_link) }}\" class=\"show_more_link\" title=\"{{ textShowMore }}\">
<p>{{ textShowMore }}...</p>
</a>
</div>
{% endif %}
</div>
</div>
{% elseif objects and selected_design == 'vertical' %}
<div class=\"block-media-pmk {{ class }}\">
{% include \"@PumukitWebTV/Resources/template_widget_title.html.twig\" %}
<div class=\"row\">
{% for object in objects %}
{% if object.isCollection() %}
{% include '@PumukitWebTV/Resources/template_series_old.html.twig' %}
{% else %}
{% include '@PumukitWebTV/Resources/template_video_legacy.html.twig' %}
{% endif %}
<div class=\"clearfix\"></div>
{% endfor %}
</div>
</div>
{% endif %}
", "@PumukitWebTV/Modules/widget_media.html.twig", "/srv/pumukit/src/Pumukit/WebTVBundle/Resources/views/Modules/widget_media.html.twig");
}
}