var/cache/dev/twig/04/043ada4adb57289c6c58459240a38c10.php line 38

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* @PumukitWebTV/Modules/widget_media.html.twig */
  16. class __TwigTemplate_9190e2fea771c40473a866ce41b30e73 extends Template
  17. {
  18.     private Source $source;
  19.     /**
  20.      * @var array<string, Template>
  21.      */
  22.     private array $macros = [];
  23.     public function __construct(Environment $env)
  24.     {
  25.         parent::__construct($env);
  26.         $this->source $this->getSourceContext();
  27.         $this->parent false;
  28.         $this->blocks = [
  29.         ];
  30.     }
  31.     protected function doDisplay(array $context, array $blocks = []): iterable
  32.     {
  33.         $macros $this->macros;
  34.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  35.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@PumukitWebTV/Modules/widget_media.html.twig"));
  36.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  37.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@PumukitWebTV/Modules/widget_media.html.twig"));
  38.         // line 1
  39.         $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"));
  40.         // line 2
  41.         $context["textShowMore"] = $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Show more");
  42.         // line 3
  43.         yield "
  44. ";
  45.         // line 4
  46.         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"))) {
  47.             // line 5
  48.             yield "    <div class=\"block-media-pmk ";
  49.             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"nulltrue);
  50.             yield "\">
  51.         ";
  52.             // line 6
  53.             yield from $this->load("@PumukitWebTV/Resources/template_widget_title.html.twig"6)->unwrap()->yield($context);
  54.             // line 7
  55.             yield "        <div class=\"row\">
  56.             ";
  57.             // line 8
  58.             $context['_parent'] = $context;
  59.             $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); })()));
  60.             $context['loop'] = [
  61.               'parent' => $context['_parent'],
  62.               'index0' => 0,
  63.               'index'  => 1,
  64.               'first'  => true,
  65.             ];
  66.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  67.                 $length count($context['_seq']);
  68.                 $context['loop']['revindex0'] = $length 1;
  69.                 $context['loop']['revindex'] = $length;
  70.                 $context['loop']['length'] = $length;
  71.                 $context['loop']['last'] = === $length;
  72.             }
  73.             foreach ($context['_seq'] as $context["_key"] => $context["object"]) {
  74.                 // line 9
  75.                 yield "                ";
  76.                 if ((($tmp CoreExtension::getAttribute($this->env$this->source$context["object"], "isCollection", [], "method"falsefalsefalse9)) && $tmp instanceof Markup ? (string) $tmp $tmp)) {
  77.                     // line 10
  78.                     yield "                    ";
  79.                     yield from $this->load("@PumukitWebTV/Resources/template_series.html.twig"10)->unwrap()->yield($context);
  80.                     // line 11
  81.                     yield "                ";
  82.                 } else {
  83.                     // line 12
  84.                     yield "                    ";
  85.                     yield from $this->load("@PumukitWebTV/Resources/template_video.html.twig"12)->unwrap()->yield($context);
  86.                     // line 13
  87.                     yield "                ";
  88.                 }
  89.                 // line 14
  90.                 yield "                ";
  91.                 yield from $this->load("@PumukitWebTV/Resources/template_clearfix.html.twig"14)->unwrap()->yield($context);
  92.                 // line 15
  93.                 yield "            ";
  94.                 ++$context['loop']['index0'];
  95.                 ++$context['loop']['index'];
  96.                 $context['loop']['first'] = false;
  97.                 if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  98.                     --$context['loop']['revindex0'];
  99.                     --$context['loop']['revindex'];
  100.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  101.                 }
  102.             }
  103.             $_parent $context['_parent'];
  104.             unset($context['_seq'], $context['_key'], $context['object'], $context['_parent'], $context['loop']);
  105.             $context array_intersect_key($context$_parent) + $_parent;
  106.             // line 16
  107.             yield "
  108.             ";
  109.             // line 17
  110.             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)) {
  111.                 // line 18
  112.                 yield "                ";
  113.                 yield from $this->load("@PumukitWebTV/Misc/show_more.html.twig"18)->unwrap()->yield($context);
  114.                 // line 19
  115.                 yield "            ";
  116.             }
  117.             // line 20
  118.             yield "            ";
  119.             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)) {
  120.                 // line 21
  121.                 yield "                <div class=\"col-xs-12 text-right\">
  122.                     <a href=\"";
  123.                 // line 22
  124.                 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); })()));
  125.                 yield "\" class=\"show_more_link\" title=\"";
  126.                 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"nulltrue);
  127.                 yield "\">
  128.                         <p>";
  129.                 // line 23
  130.                 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"nulltrue);
  131.                 yield "...</p>
  132.                     </a>
  133.                 </div>
  134.             ";
  135.             }
  136.             // line 27
  137.             yield "        </div>
  138.     </div>
  139. ";
  140.         } elseif ((        // line 29
  141. (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"))) {
  142.             // line 30
  143.             yield "    <div class=\"block-media-pmk ";
  144.             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"nulltrue);
  145.             yield "\">
  146.         ";
  147.             // line 31
  148.             yield from $this->load("@PumukitWebTV/Resources/template_widget_title.html.twig"31)->unwrap()->yield($context);
  149.             // line 32
  150.             yield "        <div class=\"row\">
  151.             ";
  152.             // line 33
  153.             $context['_parent'] = $context;
  154.             $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); })()));
  155.             $context['loop'] = [
  156.               'parent' => $context['_parent'],
  157.               'index0' => 0,
  158.               'index'  => 1,
  159.               'first'  => true,
  160.             ];
  161.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  162.                 $length count($context['_seq']);
  163.                 $context['loop']['revindex0'] = $length 1;
  164.                 $context['loop']['revindex'] = $length;
  165.                 $context['loop']['length'] = $length;
  166.                 $context['loop']['last'] = === $length;
  167.             }
  168.             foreach ($context['_seq'] as $context["_key"] => $context["object"]) {
  169.                 // line 34
  170.                 yield "                ";
  171.                 if ((($tmp CoreExtension::getAttribute($this->env$this->source$context["object"], "isCollection", [], "method"falsefalsefalse34)) && $tmp instanceof Markup ? (string) $tmp $tmp)) {
  172.                     // line 35
  173.                     yield "                    ";
  174.                     yield from $this->load("@PumukitWebTV/Resources/template_series_old.html.twig"35)->unwrap()->yield($context);
  175.                     // line 36
  176.                     yield "                ";
  177.                 } else {
  178.                     // line 37
  179.                     yield "                    ";
  180.                     yield from $this->load("@PumukitWebTV/Resources/template_video_legacy.html.twig"37)->unwrap()->yield($context);
  181.                     // line 38
  182.                     yield "                ";
  183.                 }
  184.                 // line 39
  185.                 yield "                <div class=\"clearfix\"></div>
  186.             ";
  187.                 ++$context['loop']['index0'];
  188.                 ++$context['loop']['index'];
  189.                 $context['loop']['first'] = false;
  190.                 if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  191.                     --$context['loop']['revindex0'];
  192.                     --$context['loop']['revindex'];
  193.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  194.                 }
  195.             }
  196.             $_parent $context['_parent'];
  197.             unset($context['_seq'], $context['_key'], $context['object'], $context['_parent'], $context['loop']);
  198.             $context array_intersect_key($context$_parent) + $_parent;
  199.             // line 41
  200.             yield "        </div>
  201.     </div>
  202. ";
  203.         }
  204.         
  205.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  206.         
  207.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  208.         yield from [];
  209.     }
  210.     /**
  211.      * @codeCoverageIgnore
  212.      */
  213.     public function getTemplateName(): string
  214.     {
  215.         return "@PumukitWebTV/Modules/widget_media.html.twig";
  216.     }
  217.     /**
  218.      * @codeCoverageIgnore
  219.      */
  220.     public function isTraitable(): bool
  221.     {
  222.         return false;
  223.     }
  224.     /**
  225.      * @codeCoverageIgnore
  226.      */
  227.     public function getDebugInfo(): array
  228.     {
  229.         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,);
  230.     }
  231.     public function getSourceContext(): Source
  232.     {
  233.         return new Source("{% set selected_design = design|default('horizontal') %}
  234. {% set textShowMore = \"Show more\"|trans %}
  235. {% if objects and selected_design == 'horizontal' %}
  236.     <div class=\"block-media-pmk {{ class }}\">
  237.         {% include \"@PumukitWebTV/Resources/template_widget_title.html.twig\" %}
  238.         <div class=\"row\">
  239.             {% for object in objects %}
  240.                 {% if object.isCollection() %}
  241.                     {% include '@PumukitWebTV/Resources/template_series.html.twig' %}
  242.                 {% else %}
  243.                     {% include '@PumukitWebTV/Resources/template_video.html.twig' %}
  244.                 {% endif %}
  245.                 {% include \"@PumukitWebTV/Resources/template_clearfix.html.twig\" %}
  246.             {% endfor %}
  247.             {% if show_more|default(false) %}
  248.                 {% include '@PumukitWebTV/Misc/show_more.html.twig' %}
  249.             {% endif %}
  250.             {% if show_link|default(false) %}
  251.                 <div class=\"col-xs-12 text-right\">
  252.                     <a href=\"{{ path(show_link) }}\" class=\"show_more_link\" title=\"{{ textShowMore }}\">
  253.                         <p>{{ textShowMore }}...</p>
  254.                     </a>
  255.                 </div>
  256.             {% endif %}
  257.         </div>
  258.     </div>
  259. {% elseif objects and selected_design == 'vertical' %}
  260.     <div class=\"block-media-pmk {{ class }}\">
  261.         {% include \"@PumukitWebTV/Resources/template_widget_title.html.twig\" %}
  262.         <div class=\"row\">
  263.             {% for object in objects %}
  264.                 {% if object.isCollection() %}
  265.                     {% include '@PumukitWebTV/Resources/template_series_old.html.twig' %}
  266.                 {% else %}
  267.                     {% include '@PumukitWebTV/Resources/template_video_legacy.html.twig' %}
  268.                 {% endif %}
  269.                 <div class=\"clearfix\"></div>
  270.             {% endfor %}
  271.         </div>
  272.     </div>
  273. {% endif %}
  274. ""@PumukitWebTV/Modules/widget_media.html.twig""/srv/pumukit/src/Pumukit/WebTVBundle/Resources/views/Modules/widget_media.html.twig");
  275.     }
  276. }