var/cache/dev/twig/ed/ed9755d32a906f054d8b7cfd2a5ae3e47c0b1e8063367cf8a17cc37f6b8ab5f1.php line 85

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* PageParts/VideoPagePart/view.html.twig */
  14. class __TwigTemplate_2ef431d71fc8cfb7a1f9483f78f55e08370f2072244fcb1c69c73ccb0a1edd48 extends \Twig\Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->parent false;
  23.         $this->blocks = [
  24.         ];
  25.     }
  26.     protected function doDisplay(array $context, array $blocks = [])
  27.     {
  28.         $macros $this->macros;
  29.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""PageParts/VideoPagePart/view.html.twig"));
  31.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""PageParts/VideoPagePart/view.html.twig"));
  33.         // line 1
  34.         $macros["buildImage"] = $this->macros["buildImage"] = $this;
  35.         // line 2
  36.         echo "
  37. ";
  38.         // line 21
  39.         echo "
  40. ";
  41.         // line 23
  42.         if ((twig_get_attribute($this->env$this->source, ($context["resource"] ?? null), "video", [], "any"truetruefalse23) && twig_get_attribute($this->env$this->source, (isset($context["resource"]) || array_key_exists("resource"$context) ? $context["resource"] : (function () { throw new RuntimeError('Variable "resource" does not exist.'23$this->source); })()), "video", [], "any"falsefalsefalse23))) {
  43.             // line 24
  44.             echo "    <div class=\"video-pp\">
  45.         ";
  46.             // line 25
  47.             $context["videoImage"] = $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("frontend/img/general/video-pp--default.svg");
  48.             // line 26
  49.             echo "        ";
  50.             $context["imageType"] = "jpg";
  51.             // line 27
  52.             echo "        ";
  53.             if ( !twig_test_empty(twig_get_attribute($this->env$this->source, (isset($context["resource"]) || array_key_exists("resource"$context) ? $context["resource"] : (function () { throw new RuntimeError('Variable "resource" does not exist.'27$this->source); })()), "thumbnail", [], "any"falsefalsefalse27))) {
  54.                 // line 28
  55.                 echo "            ";
  56.                 $context["videoImage"] = $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Liip\ImagineBundle\Templating\FilterExtension']->filter(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["resource"]) || array_key_exists("resource"$context) ? $context["resource"] : (function () { throw new RuntimeError('Variable "resource" does not exist.'28$this->source); })()), "thumbnail", [], "any"falsefalsefalse28), "url", [], "any"falsefalsefalse28), "optim"));
  57.                 // line 29
  58.                 echo "            ";
  59.                 $context["imageType"] = twig_last($this->envtwig_split_filter($this->envtwig_lower_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["resource"]) || array_key_exists("resource"$context) ? $context["resource"] : (function () { throw new RuntimeError('Variable "resource" does not exist.'29$this->source); })()), "thumbnail", [], "any"falsefalsefalse29), "originalFilename", [], "any"falsefalsefalse29)), "."));
  60.                 // line 30
  61.                 echo "        ";
  62.             }
  63.             // line 31
  64.             echo "
  65.         ";
  66.             // line 32
  67.             $context["handler"] = twig_get_attribute($this->env$this->source, (isset($context["mediamanager"]) || array_key_exists("mediamanager"$context) ? $context["mediamanager"] : (function () { throw new RuntimeError('Variable "mediamanager" does not exist.'32$this->source); })()), "getHandler", [=> twig_get_attribute($this->env$this->source, (isset($context["resource"]) || array_key_exists("resource"$context) ? $context["resource"] : (function () { throw new RuntimeError('Variable "resource" does not exist.'32$this->source); })()), "video", [], "any"falsefalsefalse32)], "method"falsefalsefalse32);
  68.             // line 33
  69.             echo "        ";
  70.             $context["helper"] = twig_get_attribute($this->env$this->source, (isset($context["handler"]) || array_key_exists("handler"$context) ? $context["handler"] : (function () { throw new RuntimeError('Variable "handler" does not exist.'33$this->source); })()), "getFormHelper", [=> twig_get_attribute($this->env$this->source, (isset($context["resource"]) || array_key_exists("resource"$context) ? $context["resource"] : (function () { throw new RuntimeError('Variable "resource" does not exist.'33$this->source); })()), "video", [], "any"falsefalsefalse33)], "method"falsefalsefalse33);
  71.             // line 34
  72.             echo "
  73.         ";
  74.             // line 35
  75.             if ((twig_get_attribute($this->env$this->source, (isset($context["helper"]) || array_key_exists("helper"$context) ? $context["helper"] : (function () { throw new RuntimeError('Variable "helper" does not exist.'35$this->source); })()), "type", [], "any"falsefalsefalse35) == "youtube")) {
  76.                 // line 36
  77.                 echo "            ";
  78.                 $context["videoEmbedUrl"] = ("//www.youtube.com/embed/" twig_get_attribute($this->env$this->source, (isset($context["helper"]) || array_key_exists("helper"$context) ? $context["helper"] : (function () { throw new RuntimeError('Variable "helper" does not exist.'36$this->source); })()), "code", [], "any"falsefalsefalse36));
  79.                 // line 37
  80.                 echo "        ";
  81.             } elseif ((twig_get_attribute($this->env$this->source, (isset($context["helper"]) || array_key_exists("helper"$context) ? $context["helper"] : (function () { throw new RuntimeError('Variable "helper" does not exist.'37$this->source); })()), "type", [], "any"falsefalsefalse37) == "vimeo")) {
  82.                 // line 38
  83.                 echo "            ";
  84.                 $context["videoEmbedUrl"] = ("//player.vimeo.com/video/" twig_get_attribute($this->env$this->source, (isset($context["helper"]) || array_key_exists("helper"$context) ? $context["helper"] : (function () { throw new RuntimeError('Variable "helper" does not exist.'38$this->source); })()), "code", [], "any"falsefalsefalse38));
  85.                 // line 39
  86.                 echo "        ";
  87.             } elseif ((twig_get_attribute($this->env$this->source, (isset($context["helper"]) || array_key_exists("helper"$context) ? $context["helper"] : (function () { throw new RuntimeError('Variable "helper" does not exist.'39$this->source); })()), "type", [], "any"falsefalsefalse39) == "dailymotion")) {
  88.                 // line 40
  89.                 echo "            ";
  90.                 $context["videoEmbedUrl"] = ("//www.dailymotion.com/embed/video/" twig_get_attribute($this->env$this->source, (isset($context["helper"]) || array_key_exists("helper"$context) ? $context["helper"] : (function () { throw new RuntimeError('Variable "helper" does not exist.'40$this->source); })()), "code", [], "any"falsefalsefalse40));
  91.                 // line 41
  92.                 echo "        ";
  93.             }
  94.             // line 42
  95.             echo "
  96.         <div class=\"videolink\">
  97.             <a href=\"";
  98.             // line 44
  99.             echo twig_escape_filter($this->env, (isset($context["videoEmbedUrl"]) || array_key_exists("videoEmbedUrl"$context) ? $context["videoEmbedUrl"] : (function () { throw new RuntimeError('Variable "videoEmbedUrl" does not exist.'44$this->source); })()), "html"nulltrue);
  100.             echo "\" target=\"_blank\" rel=\"noopener\" class=\"js-videolink-play-link videolink__video-link\" data-video-provider=\"";
  101.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["helper"]) || array_key_exists("helper"$context) ? $context["helper"] : (function () { throw new RuntimeError('Variable "helper" does not exist.'44$this->source); })()), "type", [], "any"falsefalsefalse44), "html"nulltrue);
  102.             echo "\" data-video-id=\"";
  103.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["helper"]) || array_key_exists("helper"$context) ? $context["helper"] : (function () { throw new RuntimeError('Variable "helper" does not exist.'44$this->source); })()), "code", [], "any"falsefalsefalse44), "html"nulltrue);
  104.             echo "\" data-make-fluid=\"true\">
  105.                 <i class=\"videolink__video-link__icon icon icon--play\"></i>
  106.                 ";
  107.             // line 46
  108.             if ( !twig_test_empty(twig_get_attribute($this->env$this->source, (isset($context["resource"]) || array_key_exists("resource"$context) ? $context["resource"] : (function () { throw new RuntimeError('Variable "resource" does not exist.'46$this->source); })()), "thumbnail", [], "any"falsefalsefalse46))) {
  109.                 // line 47
  110.                 echo "                    ";
  111.                 echo twig_call_macro($macros["buildImage"], "macro_setFilters", [twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["resource"]) || array_key_exists("resource"$context) ? $context["resource"] : (function () { throw new RuntimeError('Variable "resource" does not exist.'47$this->source); })()), "thumbnail", [], "any"falsefalsefalse47), "url", [], "any"falsefalsefalse47), twig_get_attribute($this->env$this->source, (isset($context["resource"]) || array_key_exists("resource"$context) ? $context["resource"] : (function () { throw new RuntimeError('Variable "resource" does not exist.'47$this->source); })()), "caption", [], "any"falsefalsefalse47), (isset($context["imageType"]) || array_key_exists("imageType"$context) ? $context["imageType"] : (function () { throw new RuntimeError('Variable "imageType" does not exist.'47$this->source); })())], 47$context$this->getSourceContext());
  112.                 echo "
  113.                 ";
  114.             } else {
  115.                 // line 49
  116.                 echo "                    <img class=\"video-pp__link__img\" src=\"";
  117.                 echo twig_escape_filter($this->env, (("https://i.ytimg.com/vi/" twig_get_attribute($this->env$this->source, (isset($context["helper"]) || array_key_exists("helper"$context) ? $context["helper"] : (function () { throw new RuntimeError('Variable "helper" does not exist.'49$this->source); })()), "code", [], "any"falsefalsefalse49)) . "/maxresdefault.jpg"), "html"nulltrue);
  118.                 echo "\" alt=\"\">
  119.                 ";
  120.             }
  121.             // line 51
  122.             echo "            </a>
  123.             <div class=\"js-videolink-container videolink__video-container\"></div>
  124.         </div>
  125.         ";
  126.             // line 55
  127.             if (twig_get_attribute($this->env$this->source, (isset($context["resource"]) || array_key_exists("resource"$context) ? $context["resource"] : (function () { throw new RuntimeError('Variable "resource" does not exist.'55$this->source); })()), "caption", [], "any"falsefalsefalse55)) {
  128.                 // line 56
  129.                 echo "            <div class=\"video-pp__caption\">
  130.                 <p class=\"video-pp__caption__text\">";
  131.                 // line 57
  132.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["resource"]) || array_key_exists("resource"$context) ? $context["resource"] : (function () { throw new RuntimeError('Variable "resource" does not exist.'57$this->source); })()), "caption", [], "any"falsefalsefalse57), "html"nulltrue);
  133.                 echo "</p>
  134.             </div>
  135.         ";
  136.             }
  137.             // line 60
  138.             echo "    </div>
  139. ";
  140.         }
  141.         
  142.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  143.         
  144.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  145.     }
  146.     // line 3
  147.     public function macro_setFilters($__image__ null$__altText__ null$__type__ null$__cropping__ null, ...$__varargs__)
  148.     {
  149.         $macros $this->macros;
  150.         $context $this->env->mergeGlobals([
  151.             "image" => $__image__,
  152.             "altText" => $__altText__,
  153.             "type" => $__type__,
  154.             "cropping" => $__cropping__,
  155.             "varargs" => $__varargs__,
  156.         ]);
  157.         $blocks = [];
  158.         ob_start();
  159.         try {
  160.             $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  161.             $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""setFilters"));
  162.             $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  163.             $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""setFilters"));
  164.             // line 4
  165.             echo "
  166.     ";
  167.             // line 5
  168.             $context["imgUrl"] = "";
  169.             // line 6
  170.             echo "
  171.     ";
  172.             // line 7
  173.             if (twig_in_filter((isset($context["type"]) || array_key_exists("type"$context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.'7$this->source); })()), [=> "svg"=> "gif"])) {
  174.                 // line 8
  175.                 echo "        ";
  176.                 $context["imgUrl"] = $this->extensions['Symfony\Bridge\Twig\Extension\HttpFoundationExtension']->generateAbsoluteUrl($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl((isset($context["image"]) || array_key_exists("image"$context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.'8$this->source); })())));
  177.                 // line 9
  178.                 echo "        <img class=\"video-pp__link__img\" src=\"";
  179.                 echo twig_escape_filter($this->env, (isset($context["imgUrl"]) || array_key_exists("imgUrl"$context) ? $context["imgUrl"] : (function () { throw new RuntimeError('Variable "imgUrl" does not exist.'9$this->source); })()), "html"nulltrue);
  180.                 echo "\"";
  181.                 if ((isset($context["altText"]) || array_key_exists("altText"$context) ? $context["altText"] : (function () { throw new RuntimeError('Variable "altText" does not exist.'9$this->source); })())) {
  182.                     echo " alt=\"";
  183.                     echo twig_escape_filter($this->env, (isset($context["altText"]) || array_key_exists("altText"$context) ? $context["altText"] : (function () { throw new RuntimeError('Variable "altText" does not exist.'9$this->source); })()), "html"nulltrue);
  184.                     echo "\"";
  185.                 }
  186.                 echo " />
  187.     ";
  188.             } else {
  189.                 // line 11
  190.                 echo "        ";
  191.                 $context["previewSrc"] = call_user_func_array($this->env->getFunction('croppedImgSrc')->getCallable(), [(isset($context["image"]) || array_key_exists("image"$context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.'11$this->source); })()), (isset($context["cropping"]) || array_key_exists("cropping"$context) ? $context["cropping"] : (function () { throw new RuntimeError('Variable "cropping" does not exist.'11$this->source); })()), twig_get_attribute($this->env$this->source, (isset($context["jml_img_large"]) || array_key_exists("jml_img_large"$context) ? $context["jml_img_large"] : (function () { throw new RuntimeError('Variable "jml_img_large" does not exist.'11$this->source); })()), "preview", [], "any"falsefalsefalse11)]);
  192.                 // line 12
  193.                 echo "        ";
  194.                 $context["mobileSrc"] = call_user_func_array($this->env->getFunction('croppedImgSrc')->getCallable(), [(isset($context["image"]) || array_key_exists("image"$context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.'12$this->source); })()), (isset($context["cropping"]) || array_key_exists("cropping"$context) ? $context["cropping"] : (function () { throw new RuntimeError('Variable "cropping" does not exist.'12$this->source); })()), twig_get_attribute($this->env$this->source, (isset($context["jml_img_large"]) || array_key_exists("jml_img_large"$context) ? $context["jml_img_large"] : (function () { throw new RuntimeError('Variable "jml_img_large" does not exist.'12$this->source); })()), "mobile", [], "any"falsefalsefalse12)]);
  195.                 // line 13
  196.                 echo "        ";
  197.                 $context["imgSrc"] = call_user_func_array($this->env->getFunction('croppedImgSrc')->getCallable(), [(isset($context["image"]) || array_key_exists("image"$context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.'13$this->source); })()), (isset($context["cropping"]) || array_key_exists("cropping"$context) ? $context["cropping"] : (function () { throw new RuntimeError('Variable "cropping" does not exist.'13$this->source); })()), twig_get_attribute($this->env$this->source, (isset($context["jml_img_large"]) || array_key_exists("jml_img_large"$context) ? $context["jml_img_large"] : (function () { throw new RuntimeError('Variable "jml_img_large" does not exist.'13$this->source); })()), "full", [], "any"falsefalsefalse13)]);
  198.                 // line 14
  199.                 echo "
  200.         <img class=\"video-pp__link__img lazy\" src=\"";
  201.                 // line 15
  202.                 echo twig_escape_filter($this->env, (isset($context["previewSrc"]) || array_key_exists("previewSrc"$context) ? $context["previewSrc"] : (function () { throw new RuntimeError('Variable "previewSrc" does not exist.'15$this->source); })()), "html"nulltrue);
  203.                 echo "\" data-srcset=\"";
  204.                 echo twig_escape_filter($this->env, (isset($context["mobileSrc"]) || array_key_exists("mobileSrc"$context) ? $context["mobileSrc"] : (function () { throw new RuntimeError('Variable "mobileSrc" does not exist.'15$this->source); })()), "html"nulltrue);
  205.                 echo " 480w, ";
  206.                 echo twig_escape_filter($this->env, (isset($context["imgSrc"]) || array_key_exists("imgSrc"$context) ? $context["imgSrc"] : (function () { throw new RuntimeError('Variable "imgSrc" does not exist.'15$this->source); })()), "html"nulltrue);
  207.                 echo " 1920w\"";
  208.                 if ((isset($context["altText"]) || array_key_exists("altText"$context) ? $context["altText"] : (function () { throw new RuntimeError('Variable "altText" does not exist.'15$this->source); })())) {
  209.                     echo " sizes=\"100vw\" alt=\"";
  210.                     echo twig_escape_filter($this->env, (isset($context["altText"]) || array_key_exists("altText"$context) ? $context["altText"] : (function () { throw new RuntimeError('Variable "altText" does not exist.'15$this->source); })()), "html"nulltrue);
  211.                     echo "\"";
  212.                 }
  213.                 echo "/>
  214.         <noscript>
  215.             <img class=\"video-pp__link__img\" src=\"";
  216.                 // line 17
  217.                 echo twig_escape_filter($this->env, (isset($context["previewSrc"]) || array_key_exists("previewSrc"$context) ? $context["previewSrc"] : (function () { throw new RuntimeError('Variable "previewSrc" does not exist.'17$this->source); })()), "html"nulltrue);
  218.                 echo "\"";
  219.                 if ((isset($context["altText"]) || array_key_exists("altText"$context) ? $context["altText"] : (function () { throw new RuntimeError('Variable "altText" does not exist.'17$this->source); })())) {
  220.                     echo " alt=\"";
  221.                     echo twig_escape_filter($this->env, (isset($context["altText"]) || array_key_exists("altText"$context) ? $context["altText"] : (function () { throw new RuntimeError('Variable "altText" does not exist.'17$this->source); })()), "html"nulltrue);
  222.                     echo "\"";
  223.                 }
  224.                 echo " />
  225.         </noscript>
  226.     ";
  227.             }
  228.             
  229.             $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  230.             
  231.             $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  232.             return ('' === $tmp ob_get_contents()) ? '' : new Markup($tmp$this->env->getCharset());
  233.         } finally {
  234.             ob_end_clean();
  235.         }
  236.     }
  237.     public function getTemplateName()
  238.     {
  239.         return "PageParts/VideoPagePart/view.html.twig";
  240.     }
  241.     public function isTraitable()
  242.     {
  243.         return false;
  244.     }
  245.     public function getDebugInfo()
  246.     {
  247.         return array (  235 => 17,  220 => 15,  217 => 14,  214 => 13,  211 => 12,  208 => 11,  196 => 9,  193 => 8,  191 => 7,  188 => 6,  186 => 5,  183 => 4,  161 => 3,  149 => 60,  143 => 57,  140 => 56,  138 => 55,  132 => 51,  126 => 49,  120 => 47,  118 => 46,  109 => 44,  105 => 42,  102 => 41,  99 => 40,  96 => 39,  93 => 38,  90 => 37,  87 => 36,  85 => 35,  82 => 34,  79 => 33,  77 => 32,  74 => 31,  71 => 30,  68 => 29,  65 => 28,  62 => 27,  59 => 26,  57 => 25,  54 => 24,  52 => 23,  48 => 21,  45 => 2,  43 => 1,);
  248.     }
  249.     public function getSourceContext()
  250.     {
  251.         return new Source("{% import _self as buildImage %}
  252. {% macro setFilters(image, altText, type, cropping) %}
  253.     {% set imgUrl = '' %}
  254.     {% if type in ['svg', 'gif'] %}
  255.         {% set imgUrl = absolute_url(asset(image)) %}
  256.         <img class=\"video-pp__link__img\" src=\"{{ imgUrl }}\"{% if altText %} alt=\"{{ altText }}\"{% endif %} />
  257.     {% else %}
  258.         {% set previewSrc = croppedImgSrc(image, cropping, jml_img_large.preview) %}
  259.         {% set mobileSrc = croppedImgSrc(image, cropping, jml_img_large.mobile) %}
  260.         {% set imgSrc = croppedImgSrc(image, cropping, jml_img_large.full) %}
  261.         <img class=\"video-pp__link__img lazy\" src=\"{{ previewSrc }}\" data-srcset=\"{{ mobileSrc }} 480w, {{ imgSrc }} 1920w\"{% if altText %} sizes=\"100vw\" alt=\"{{ altText }}\"{% endif %}/>
  262.         <noscript>
  263.             <img class=\"video-pp__link__img\" src=\"{{ previewSrc }}\"{% if altText %} alt=\"{{ altText }}\"{% endif %} />
  264.         </noscript>
  265.     {% endif %}
  266. {% endmacro %}
  267. {% if resource.video is defined and resource.video %}
  268.     <div class=\"video-pp\">
  269.         {% set videoImage = asset('frontend/img/general/video-pp--default.svg') %}
  270.         {% set imageType = 'jpg' %}
  271.         {% if resource.thumbnail is not empty %}
  272.             {% set videoImage = asset(resource.thumbnail.url|imagine_filter('optim')) %}
  273.             {% set imageType = resource.thumbnail.originalFilename|lower|split('.')|last %}
  274.         {% endif %}
  275.         {% set handler = mediamanager.getHandler(resource.video) %}
  276.         {% set helper = handler.getFormHelper(resource.video) %}
  277.         {% if helper.type == 'youtube' %}
  278.             {% set videoEmbedUrl = \"//www.youtube.com/embed/\" ~ helper.code %}
  279.         {% elseif helper.type == 'vimeo' %}
  280.             {% set videoEmbedUrl = \"//player.vimeo.com/video/\" ~ helper.code %}
  281.         {% elseif helper.type == 'dailymotion' %}
  282.             {% set videoEmbedUrl = \"//www.dailymotion.com/embed/video/\" ~ helper.code %}
  283.         {% endif %}
  284.         <div class=\"videolink\">
  285.             <a href=\"{{ videoEmbedUrl }}\" target=\"_blank\" rel=\"noopener\" class=\"js-videolink-play-link videolink__video-link\" data-video-provider=\"{{ helper.type }}\" data-video-id=\"{{ helper.code }}\" data-make-fluid=\"true\">
  286.                 <i class=\"videolink__video-link__icon icon icon--play\"></i>
  287.                 {% if resource.thumbnail is not empty %}
  288.                     {{ buildImage.setFilters(resource.thumbnail.url, resource.caption, imageType) }}
  289.                 {% else %}
  290.                     <img class=\"video-pp__link__img\" src=\"{{ 'https://i.ytimg.com/vi/' ~ helper.code ~ '/maxresdefault.jpg' }}\" alt=\"\">
  291.                 {% endif %}
  292.             </a>
  293.             <div class=\"js-videolink-container videolink__video-container\"></div>
  294.         </div>
  295.         {% if resource.caption %}
  296.             <div class=\"video-pp__caption\">
  297.                 <p class=\"video-pp__caption__text\">{{ resource.caption }}</p>
  298.             </div>
  299.         {% endif %}
  300.     </div>
  301. {% endif %}
  302. ""PageParts/VideoPagePart/view.html.twig""/var/www/gcs/html/dev/templates/PageParts/VideoPagePart/view.html.twig");
  303.     }
  304. }