<?php
use Twig\Environment;
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;
/* PageParts/VideosGalleryPagePart/view.html.twig */
class __TwigTemplate_8198002de5a76dbf62104798c38bc74c56dd25d9213b7efd06c8de6b4b4afa1f extends \Twig\Template
{
private $source;
private $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 = [])
{
$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", "PageParts/VideosGalleryPagePart/view.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "PageParts/VideosGalleryPagePart/view.html.twig"));
// line 1
if ((twig_length_filter($this->env, 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.', 1, $this->source); })()), "videos", [], "any", false, false, false, 1)) > 1)) {
// line 2
echo "
";
// line 3
if ((twig_get_attribute($this->env, $this->source, ($context["resource"] ?? null), "videos", [], "any", true, true, false, 3) && 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.', 3, $this->source); })()), "videos", [], "any", false, false, false, 3))) {
// line 4
echo "
";
// line 5
$context["videoImage"] = $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("frontend/img/general/video-pp--default.svg");
// line 6
echo " ";
$context["imageType"] = "jpg";
// line 7
echo "
";
}
// line 9
echo "
<div class=\"gallery video-gallery video-pp\" id=\"video-gallery-";
// line 10
echo twig_escape_filter($this->env, 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.', 10, $this->source); })()), "id", [], "any", false, false, false, 10), "html", null, true);
echo "\">
<div class=\"gallery-boxes\">
";
// line 14
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(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.', 14, $this->source); })()), "videos", [], "any", false, false, false, 14));
foreach ($context['_seq'] as $context["_key"] => $context["video"]) {
// line 15
echo "
";
// line 16
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["video"], "media", [], "any", false, false, false, 16), "contentType", [], "any", false, false, false, 16) != "video/mp4")) {
// line 17
echo "
";
// line 18
$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.', 18, $this->source); })()), "getHandler", [0 => twig_get_attribute($this->env, $this->source, $context["video"], "media", [], "any", false, false, false, 18)], "method", false, false, false, 18);
// line 19
echo " ";
$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.', 19, $this->source); })()), "getFormHelper", [0 => twig_get_attribute($this->env, $this->source, $context["video"], "media", [], "any", false, false, false, 19)], "method", false, false, false, 19);
// line 20
echo "
";
// line 21
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.', 21, $this->source); })()), "type", [], "any", false, false, false, 21) == "youtube")) {
// line 22
echo " ";
$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.', 22, $this->source); })()), "code", [], "any", false, false, false, 22));
// line 23
echo " ";
} 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.', 23, $this->source); })()), "type", [], "any", false, false, false, 23) == "vimeo")) {
// line 24
echo " ";
$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.', 24, $this->source); })()), "code", [], "any", false, false, false, 24));
// line 25
echo " ";
} 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.', 25, $this->source); })()), "type", [], "any", false, false, false, 25) == "dailymotion")) {
// line 26
echo " ";
$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.', 26, $this->source); })()), "code", [], "any", false, false, false, 26));
// line 27
echo " ";
}
// line 28
echo "
";
}
// line 30
echo "
<div class=\"gallery-box\">
<div class=\"videolink\">
";
// line 34
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["video"], "media", [], "any", false, false, false, 34), "contentType", [], "any", false, false, false, 34) != "video/mp4")) {
// line 35
echo "
<a href=\"";
// line 36
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.', 36, $this->source); })()), "html", null, true);
echo "\" target=\"_blank\" rel=\"noopener\" class=\"js-videolink-play-link videolink__video-link\" data-video-provider=\"";
echo twig_escape_filter($this->env, 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); })()), "type", [], "any", false, false, false, 36), "html", null, true);
echo "\" data-video-id=\"";
echo twig_escape_filter($this->env, 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", false, false, false, 36), "html", null, true);
echo "\" data-make-fluid=\"true\">
<i class=\"videolink__video-link__icon fas fa-play\"></i>
";
// line 39
$context["img"] = ((twig_get_attribute($this->env, $this->source, $context["video"], "preview", [], "any", false, false, false, 39)) ? (twig_get_attribute($this->env, $this->source, $context["video"], "preview", [], "any", false, false, false, 39)) : (null));
// line 40
echo "
";
// line 41
if (( !(null === (isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 41, $this->source); })())) && !twig_test_empty((isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 41, $this->source); })())))) {
// line 42
echo "
";
// line 43
$context["fullSrc"] = call_user_func_array($this->env->getFunction('croppedImgSrc')->getCallable(), [twig_get_attribute($this->env, $this->source, (isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 43, $this->source); })()), "url", [], "any", false, false, false, 43), twig_get_attribute($this->env, $this->source, (isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 43, $this->source); })()), "cropping", [], "any", false, false, false, 43), ["w" => 1400, "q" => 80]]);
// line 44
echo " ";
$context["previewSrc"] = call_user_func_array($this->env->getFunction('croppedImgSrc')->getCallable(), [twig_get_attribute($this->env, $this->source, (isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 44, $this->source); })()), "url", [], "any", false, false, false, 44), twig_get_attribute($this->env, $this->source, (isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 44, $this->source); })()), "cropping", [], "any", false, false, false, 44), 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.', 44, $this->source); })()), "preview", [], "any", false, false, false, 44)]);
// line 45
echo "
<img class=\"video-pp__link__img lazy\"
src=\"";
// line 47
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.', 47, $this->source); })()), "html", null, true);
echo "\" data-src=\"";
echo twig_escape_filter($this->env, (isset($context["fullSrc"]) || array_key_exists("fullSrc", $context) ? $context["fullSrc"] : (function () { throw new RuntimeError('Variable "fullSrc" does not exist.', 47, $this->source); })()), "html", null, true);
echo "\"
";
// line 48
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["video"], "media", [], "any", false, false, false, 48), "name", [], "any", false, false, false, 48)) {
echo "alt=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["video"], "media", [], "any", false, false, false, 48), "name", [], "any", false, false, false, 48), "html", null, true);
echo "\"";
}
echo " />
";
} else {
// line 51
echo "
<img class=\"video-pp__link__img\" src=\"";
// line 52
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.', 52, $this->source); })()), "code", [], "any", false, false, false, 52)) . "/maxresdefault.jpg"), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["video"], "media", [], "any", false, false, false, 52), "name", [], "any", false, false, false, 52), "html", null, true);
echo "\">
";
}
// line 55
echo "
</a>
<div class=\"js-videolink-container videolink__video-container\"></div>
";
} else {
// line 60
echo "
<video controls>
<source src=\"";
// line 62
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["video"], "media", [], "any", false, false, false, 62), "url", [], "any", false, false, false, 62)), "html", null, true);
echo "\" type=\"video/mp4\">
</video>
";
}
// line 66
echo "
</div>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['video'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 71
echo "
</div>
<div class=\"gallery-nav\">
";
// line 76
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(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.', 76, $this->source); })()), "videos", [], "any", false, false, false, 76));
foreach ($context['_seq'] as $context["_key"] => $context["video"]) {
// line 77
echo "
";
// line 78
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["video"], "media", [], "any", false, false, false, 78), "contentType", [], "any", false, false, false, 78) != "video/mp4")) {
// line 79
echo "
";
// line 80
$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.', 80, $this->source); })()), "getHandler", [0 => twig_get_attribute($this->env, $this->source, $context["video"], "media", [], "any", false, false, false, 80)], "method", false, false, false, 80);
// line 81
echo " ";
$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.', 81, $this->source); })()), "getFormHelper", [0 => twig_get_attribute($this->env, $this->source, $context["video"], "media", [], "any", false, false, false, 81)], "method", false, false, false, 81);
// line 82
echo "
";
// line 83
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.', 83, $this->source); })()), "type", [], "any", false, false, false, 83) == "youtube")) {
// line 84
echo " ";
$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.', 84, $this->source); })()), "code", [], "any", false, false, false, 84));
// line 85
echo " ";
} 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.', 85, $this->source); })()), "type", [], "any", false, false, false, 85) == "vimeo")) {
// line 86
echo " ";
$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.', 86, $this->source); })()), "code", [], "any", false, false, false, 86));
// line 87
echo " ";
} 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.', 87, $this->source); })()), "type", [], "any", false, false, false, 87) == "dailymotion")) {
// line 88
echo " ";
$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.', 88, $this->source); })()), "code", [], "any", false, false, false, 88));
// line 89
echo " ";
}
// line 90
echo "
";
}
// line 92
echo "
<div class=\"gallery-thumb\">
<div class=\"videolink\">
";
// line 96
$context["img"] = ((twig_get_attribute($this->env, $this->source, $context["video"], "preview", [], "any", false, false, false, 96)) ? (twig_get_attribute($this->env, $this->source, $context["video"], "preview", [], "any", false, false, false, 96)) : (null));
// line 97
echo "
";
// line 98
if (( !(null === (isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 98, $this->source); })())) && !twig_test_empty((isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 98, $this->source); })())))) {
// line 99
echo " ";
$context["fullSrc"] = call_user_func_array($this->env->getFunction('croppedImgSrc')->getCallable(), [twig_get_attribute($this->env, $this->source, (isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 99, $this->source); })()), "url", [], "any", false, false, false, 99), twig_get_attribute($this->env, $this->source, (isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 99, $this->source); })()), "cropping", [], "any", false, false, false, 99), ["w" => 180, "q" => 80, "fit" => "crop"]]);
// line 100
echo " ";
$context["previewSrc"] = call_user_func_array($this->env->getFunction('croppedImgSrc')->getCallable(), [twig_get_attribute($this->env, $this->source, (isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 100, $this->source); })()), "url", [], "any", false, false, false, 100), twig_get_attribute($this->env, $this->source, (isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 100, $this->source); })()), "cropping", [], "any", false, false, false, 100), 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.', 100, $this->source); })()), "preview", [], "any", false, false, false, 100)]);
// line 101
echo "
<img class=\"video-pp__link__img lazy\"
src=\"";
// line 103
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.', 103, $this->source); })()), "html", null, true);
echo "\" data-src=\"";
echo twig_escape_filter($this->env, (isset($context["fullSrc"]) || array_key_exists("fullSrc", $context) ? $context["fullSrc"] : (function () { throw new RuntimeError('Variable "fullSrc" does not exist.', 103, $this->source); })()), "html", null, true);
echo "\"
";
// line 104
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["video"], "media", [], "any", false, false, false, 104), "name", [], "any", false, false, false, 104)) {
echo "alt=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["video"], "media", [], "any", false, false, false, 104), "name", [], "any", false, false, false, 104), "html", null, true);
echo "\"";
}
echo " />
";
}
// line 107
echo "
</div>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['video'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 112
echo "
</div>
<div class=\"gallery-clearfix\"></div>
</div>
";
} else {
// line 119
echo "
<div class=\"gallery\" id=\"video-gallery-";
// line 120
echo twig_escape_filter($this->env, 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.', 120, $this->source); })()), "id", [], "any", false, false, false, 120), "html", null, true);
echo "\">
<div class=\"gallery-boxes\">
";
// line 122
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(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.', 122, $this->source); })()), "videos", [], "any", false, false, false, 122));
foreach ($context['_seq'] as $context["_key"] => $context["video"]) {
// line 123
echo "
";
// line 124
$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.', 124, $this->source); })()), "getHandler", [0 => twig_get_attribute($this->env, $this->source, $context["video"], "media", [], "any", false, false, false, 124)], "method", false, false, false, 124);
// line 125
echo " ";
$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.', 125, $this->source); })()), "getFormHelper", [0 => twig_get_attribute($this->env, $this->source, $context["video"], "media", [], "any", false, false, false, 125)], "method", false, false, false, 125);
// line 126
echo "
";
// line 127
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.', 127, $this->source); })()), "type", [], "any", false, false, false, 127) == "youtube")) {
// line 128
echo " ";
$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.', 128, $this->source); })()), "code", [], "any", false, false, false, 128));
// line 129
echo " ";
} 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.', 129, $this->source); })()), "type", [], "any", false, false, false, 129) == "vimeo")) {
// line 130
echo " ";
$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.', 130, $this->source); })()), "code", [], "any", false, false, false, 130));
// line 131
echo " ";
} 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.', 131, $this->source); })()), "type", [], "any", false, false, false, 131) == "dailymotion")) {
// line 132
echo " ";
$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.', 132, $this->source); })()), "code", [], "any", false, false, false, 132));
// line 133
echo " ";
}
// line 134
echo "
<div class=\"gallery-box\">
<div class=\"videolink\">
<a href=\"";
// line 137
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.', 137, $this->source); })()), "html", null, true);
echo "\" target=\"_blank\" rel=\"noopener\" class=\"js-videolink-play-link videolink__video-link\" data-video-provider=\"";
echo twig_escape_filter($this->env, 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.', 137, $this->source); })()), "type", [], "any", false, false, false, 137), "html", null, true);
echo "\" data-video-id=\"";
echo twig_escape_filter($this->env, 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.', 137, $this->source); })()), "code", [], "any", false, false, false, 137), "html", null, true);
echo "\" data-make-fluid=\"true\">
<i class=\"videolink__video-link__icon fas fa-play\"></i>
";
// line 140
$context["img"] = ((twig_get_attribute($this->env, $this->source, $context["video"], "preview", [], "any", false, false, false, 140)) ? (twig_get_attribute($this->env, $this->source, $context["video"], "preview", [], "any", false, false, false, 140)) : (null));
// line 141
echo "
";
// line 142
if (( !(null === (isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 142, $this->source); })())) && !twig_test_empty((isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 142, $this->source); })())))) {
// line 143
echo "
";
// line 144
$context["fullSrc"] = call_user_func_array($this->env->getFunction('croppedImgSrc')->getCallable(), [twig_get_attribute($this->env, $this->source, (isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 144, $this->source); })()), "url", [], "any", false, false, false, 144), twig_get_attribute($this->env, $this->source, (isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 144, $this->source); })()), "cropping", [], "any", false, false, false, 144), ["w" => 1400, "q" => 80]]);
// line 145
echo " ";
$context["previewSrc"] = call_user_func_array($this->env->getFunction('croppedImgSrc')->getCallable(), [twig_get_attribute($this->env, $this->source, (isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 145, $this->source); })()), "url", [], "any", false, false, false, 145), twig_get_attribute($this->env, $this->source, (isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 145, $this->source); })()), "cropping", [], "any", false, false, false, 145), 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.', 145, $this->source); })()), "preview", [], "any", false, false, false, 145)]);
// line 146
echo "
<img class=\"video-pp__link__img lazy\"
src=\"";
// line 148
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.', 148, $this->source); })()), "html", null, true);
echo "\" data-src=\"";
echo twig_escape_filter($this->env, (isset($context["fullSrc"]) || array_key_exists("fullSrc", $context) ? $context["fullSrc"] : (function () { throw new RuntimeError('Variable "fullSrc" does not exist.', 148, $this->source); })()), "html", null, true);
echo "\"
";
// line 149
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["video"], "media", [], "any", false, false, false, 149), "name", [], "any", false, false, false, 149)) {
echo "alt=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["video"], "media", [], "any", false, false, false, 149), "name", [], "any", false, false, false, 149), "html", null, true);
echo "\"";
}
echo " />
";
} else {
// line 152
echo "
<img class=\"video-pp__link__img\" src=\"";
// line 153
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.', 153, $this->source); })()), "code", [], "any", false, false, false, 153)) . "/maxresdefault.jpg"), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["video"], "media", [], "any", false, false, false, 153), "name", [], "any", false, false, false, 153), "html", null, true);
echo "\">
";
}
// line 156
echo "
</a>
<div class=\"js-videolink-container videolink__video-container\"></div>
</div>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['video'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 163
echo " </div>
</div>
";
}
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "PageParts/VideosGalleryPagePart/view.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 436 => 163, 424 => 156, 416 => 153, 413 => 152, 403 => 149, 397 => 148, 393 => 146, 390 => 145, 388 => 144, 385 => 143, 383 => 142, 380 => 141, 378 => 140, 368 => 137, 363 => 134, 360 => 133, 357 => 132, 354 => 131, 351 => 130, 348 => 129, 345 => 128, 343 => 127, 340 => 126, 337 => 125, 335 => 124, 332 => 123, 328 => 122, 323 => 120, 320 => 119, 311 => 112, 301 => 107, 291 => 104, 285 => 103, 281 => 101, 278 => 100, 275 => 99, 273 => 98, 270 => 97, 268 => 96, 262 => 92, 258 => 90, 255 => 89, 252 => 88, 249 => 87, 246 => 86, 243 => 85, 240 => 84, 238 => 83, 235 => 82, 232 => 81, 230 => 80, 227 => 79, 225 => 78, 222 => 77, 218 => 76, 211 => 71, 201 => 66, 194 => 62, 190 => 60, 183 => 55, 175 => 52, 172 => 51, 162 => 48, 156 => 47, 152 => 45, 149 => 44, 147 => 43, 144 => 42, 142 => 41, 139 => 40, 137 => 39, 127 => 36, 124 => 35, 122 => 34, 116 => 30, 112 => 28, 109 => 27, 106 => 26, 103 => 25, 100 => 24, 97 => 23, 94 => 22, 92 => 21, 89 => 20, 86 => 19, 84 => 18, 81 => 17, 79 => 16, 76 => 15, 72 => 14, 65 => 10, 62 => 9, 58 => 7, 55 => 6, 53 => 5, 50 => 4, 48 => 3, 45 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% if (resource.videos | length > 1) %}
{% if resource.videos is defined and resource.videos %}
{% set videoImage = asset('frontend/img/general/video-pp--default.svg') %}
{% set imageType = 'jpg' %}
{% endif %}
<div class=\"gallery video-gallery video-pp\" id=\"video-gallery-{{ resource.id }}\">
<div class=\"gallery-boxes\">
{% for video in resource.videos %}
{% if video.media.contentType != 'video/mp4' %}
{% set handler = mediamanager.getHandler(video.media) %}
{% set helper = handler.getFormHelper(video.media) %}
{% if helper.type == 'youtube' %}
{% set videoEmbedUrl = \"//www.youtube.com/embed/\" ~ helper.code %}
{% elseif helper.type == 'vimeo' %}
{% set videoEmbedUrl = \"//player.vimeo.com/video/\" ~ helper.code %}
{% elseif helper.type == 'dailymotion' %}
{% set videoEmbedUrl = \"//www.dailymotion.com/embed/video/\" ~ helper.code %}
{% endif %}
{% endif %}
<div class=\"gallery-box\">
<div class=\"videolink\">
{% if video.media.contentType != 'video/mp4' %}
<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\">
<i class=\"videolink__video-link__icon fas fa-play\"></i>
{% set img = video.preview ? video.preview : null %}
{% if img is not null and img is not empty %}
{% set fullSrc = croppedImgSrc(img.url, img.cropping, { w: 1400, q: 80 }) %}
{% set previewSrc = croppedImgSrc(img.url, img.cropping, jml_img_large.preview) %}
<img class=\"video-pp__link__img lazy\"
src=\"{{ previewSrc }}\" data-src=\"{{ fullSrc }}\"
{% if video.media.name %}alt=\"{{ video.media.name }}\"{% endif %} />
{% else %}
<img class=\"video-pp__link__img\" src=\"{{ 'https://i.ytimg.com/vi/' ~ helper.code ~ '/maxresdefault.jpg' }}\" alt=\"{{ video.media.name }}\">
{% endif %}
</a>
<div class=\"js-videolink-container videolink__video-container\"></div>
{% else %}
<video controls>
<source src=\"{{ asset(video.media.url) }}\" type=\"video/mp4\">
</video>
{% endif %}
</div>
</div>
{% endfor %}
</div>
<div class=\"gallery-nav\">
{% for video in resource.videos %}
{% if video.media.contentType != 'video/mp4' %}
{% set handler = mediamanager.getHandler(video.media) %}
{% set helper = handler.getFormHelper(video.media) %}
{% if helper.type == 'youtube' %}
{% set videoEmbedUrl = \"//www.youtube.com/embed/\" ~ helper.code %}
{% elseif helper.type == 'vimeo' %}
{% set videoEmbedUrl = \"//player.vimeo.com/video/\" ~ helper.code %}
{% elseif helper.type == 'dailymotion' %}
{% set videoEmbedUrl = \"//www.dailymotion.com/embed/video/\" ~ helper.code %}
{% endif %}
{% endif %}
<div class=\"gallery-thumb\">
<div class=\"videolink\">
{% set img = video.preview ? video.preview : null %}
{% if img is not null and img is not empty %}
{% set fullSrc = croppedImgSrc(img.url, img.cropping, { w: 180, q: 80, fit: 'crop' }) %}
{% set previewSrc = croppedImgSrc(img.url, img.cropping, jml_img_large.preview) %}
<img class=\"video-pp__link__img lazy\"
src=\"{{ previewSrc }}\" data-src=\"{{ fullSrc }}\"
{% if video.media.name %}alt=\"{{ video.media.name }}\"{% endif %} />
{% endif %}
</div>
</div>
{% endfor %}
</div>
<div class=\"gallery-clearfix\"></div>
</div>
{% else %}
<div class=\"gallery\" id=\"video-gallery-{{ resource.id }}\">
<div class=\"gallery-boxes\">
{% for video in resource.videos %}
{% set handler = mediamanager.getHandler(video.media) %}
{% set helper = handler.getFormHelper(video.media) %}
{% if helper.type == 'youtube' %}
{% set videoEmbedUrl = \"//www.youtube.com/embed/\" ~ helper.code %}
{% elseif helper.type == 'vimeo' %}
{% set videoEmbedUrl = \"//player.vimeo.com/video/\" ~ helper.code %}
{% elseif helper.type == 'dailymotion' %}
{% set videoEmbedUrl = \"//www.dailymotion.com/embed/video/\" ~ helper.code %}
{% endif %}
<div class=\"gallery-box\">
<div class=\"videolink\">
<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\">
<i class=\"videolink__video-link__icon fas fa-play\"></i>
{% set img = video.preview ? video.preview : null %}
{% if img is not null and img is not empty %}
{% set fullSrc = croppedImgSrc(img.url, img.cropping, { w: 1400, q: 80 }) %}
{% set previewSrc = croppedImgSrc(img.url, img.cropping, jml_img_large.preview) %}
<img class=\"video-pp__link__img lazy\"
src=\"{{ previewSrc }}\" data-src=\"{{ fullSrc }}\"
{% if video.media.name %}alt=\"{{ video.media.name }}\"{% endif %} />
{% else %}
<img class=\"video-pp__link__img\" src=\"{{ 'https://i.ytimg.com/vi/' ~ helper.code ~ '/maxresdefault.jpg' }}\" alt=\"{{ video.media.name }}\">
{% endif %}
</a>
<div class=\"js-videolink-container videolink__video-container\"></div>
</div>
</div>
{% endfor %}
</div>
</div>
{% endif %}
", "PageParts/VideosGalleryPagePart/view.html.twig", "/var/www/gcs/html/dev/templates/PageParts/VideosGalleryPagePart/view.html.twig");
}
}