<?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;
/* @FoxHabbitBasis/Macro/wrap.html.twig */
class __TwigTemplate_c796e3bb11949ee85077881c0d7c887a extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doDisplay(array $context, array $blocks = [])
{
$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", "@FoxHabbitBasis/Macro/wrap.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@FoxHabbitBasis/Macro/wrap.html.twig"));
// line 200
echo "
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 1
public function macro_wrapperOpen($__wrapperConfig__ = null, $__context__ = null, $__outerClass__ = null, $__outerAttributes__ = null, ...$__varargs__)
{
$macros = $this->macros;
$context = $this->env->mergeGlobals([
"wrapperConfig" => $__wrapperConfig__,
"context" => $__context__,
"outerClass" => $__outerClass__,
"outerAttributes" => $__outerAttributes__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start();
try {
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro", "wrapperOpen"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro", "wrapperOpen"));
// line 2
ob_start();
// line 3
echo "\t";
// line 4
echo "\t";
$context["editmode"] = twig_get_attribute($this->env, $this->source, (isset($context["context"]) || array_key_exists("context", $context) ? $context["context"] : (function () { throw new RuntimeError('Variable "context" does not exist.', 4, $this->source); })()), "editmode", [], "any", false, false, true, 4);
// line 5
echo "\t";
$context["document"] = twig_get_attribute($this->env, $this->source, (isset($context["context"]) || array_key_exists("context", $context) ? $context["context"] : (function () { throw new RuntimeError('Variable "context" does not exist.', 5, $this->source); })()), "document", [], "any", false, false, true, 5);
// line 6
echo "
";
// line 7
if (twig_test_iterable((isset($context["wrapperConfig"]) || array_key_exists("wrapperConfig", $context) ? $context["wrapperConfig"] : (function () { throw new RuntimeError('Variable "wrapperConfig" does not exist.', 7, $this->source); })()))) {
// line 8
echo "\t\t";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["wrapperConfig"]) || array_key_exists("wrapperConfig", $context) ? $context["wrapperConfig"] : (function () { throw new RuntimeError('Variable "wrapperConfig" does not exist.', 8, $this->source); })()));
foreach ($context['_seq'] as $context["idx"] => $context["element"]) {
// line 9
echo "\t\t\t";
$context["hasBackground"] = ((twig_get_attribute($this->env, $this->source, $context["element"], "bg_edit_prefix", [], "any", true, true, true, 9)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["element"], "bg_edit_prefix", [], "any", false, false, true, 9), 9, $this->source), false)) : (false));
// line 10
echo "\t\t\t";
$context["editBackgroundImage"] = false;
// line 11
echo "\t\t\t";
$context["editBackgroundYoutube"] = false;
// line 12
echo "\t\t\t";
$context["editBackgroundAssetVideo"] = false;
// line 13
echo "\t\t\t";
if ((twig_get_attribute($this->env, $this->source, $context["element"], "editmode_class", [], "any", true, true, true, 13) && (isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 13, $this->source); })()))) {
// line 14
echo "\t\t\t\t";
$context["class"] = twig_get_attribute($this->env, $this->source, $context["element"], "editmode_class", [], "any", false, false, true, 14);
// line 15
echo "\t\t\t";
} else {
// line 16
echo "\t\t\t\t";
$context["class"] = twig_get_attribute($this->env, $this->source, $context["element"], "class", [], "any", false, false, true, 16);
// line 17
echo "\t\t\t";
}
// line 18
echo "\t\t\t";
$context["style"] = null;
// line 19
echo "\t\t\t";
$context["id"] = null;
// line 20
echo "\t\t\t";
$context["ytDivId"] = "yt-player";
// line 21
echo "\t\t\t";
$context["youtubePlayerProperty"] = null;
// line 22
echo "\t\t\t";
$context["youtubePlayerDivId"] = null;
// line 23
echo "\t\t\t";
$context["bgAssetVideoConfig"] = null;
// line 24
echo "\t\t\t";
$context["bgAssetVideo"] = null;
// line 25
echo "\t\t\t";
$context["bgImageObject"] = null;
// line 26
echo "\t\t\t";
if ((isset($context["hasBackground"]) || array_key_exists("hasBackground", $context) ? $context["hasBackground"] : (function () { throw new RuntimeError('Variable "hasBackground" does not exist.', 26, $this->source); })())) {
// line 27
echo "\t\t\t\t";
// line 28
echo "\t\t\t\t";
$context["bgClass"] = null;
// line 29
echo "\t\t\t\t";
$context["bgContentClass"] = null;
// line 30
echo "\t\t\t\t";
$context["bgBackgroundClass"] = null;
// line 31
echo "\t\t\t\t";
$context["bgStyle"] = null;
// line 32
echo "\t\t\t\t";
if (twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relation", ((isset($context["hasBackground"]) || array_key_exists("hasBackground", $context) ? $context["hasBackground"] : (function () { throw new RuntimeError('Variable "hasBackground" does not exist.', 32, $this->source); })()) . "-O")), "getElement", [], "method", false, false, true, 32)) {
// line 33
echo "\t\t\t\t\t";
// line 34
echo "\t\t\t\t\t";
$context["bgObject"] = twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relation", ($this->sandbox->ensureToStringAllowed((isset($context["hasBackground"]) || array_key_exists("hasBackground", $context) ? $context["hasBackground"] : (function () { throw new RuntimeError('Variable "hasBackground" does not exist.', 34, $this->source); })()), 34, $this->source) . "-O")), "getElement", [], "method", false, false, true, 34);
// line 35
echo "\t\t\t\t\t";
if (twig_get_attribute($this->env, $this->source, $context["element"], "bg_thumbnail", [], "any", true, true, true, 35)) {
// line 36
echo "\t\t\t\t\t\t";
twig_get_attribute($this->env, $this->source, (isset($context["bgObject"]) || array_key_exists("bgObject", $context) ? $context["bgObject"] : (function () { throw new RuntimeError('Variable "bgObject" does not exist.', 36, $this->source); })()), "setThumbnail", [twig_get_attribute($this->env, $this->source, $context["element"], "bg_thumbnail", [], "any", false, false, true, 36)], "method", false, false, true, 36);
// line 37
echo "\t\t\t\t\t";
}
// line 38
echo "\t\t\t\t\t";
$context["editBackgroundImage"] = twig_get_attribute($this->env, $this->source, (isset($context["bgObject"]) || array_key_exists("bgObject", $context) ? $context["bgObject"] : (function () { throw new RuntimeError('Variable "bgObject" does not exist.', 38, $this->source); })()), "canAddImage", [], "method", false, false, true, 38);
// line 39
echo "\t\t\t\t\t";
if ((isset($context["editBackgroundImage"]) || array_key_exists("editBackgroundImage", $context) ? $context["editBackgroundImage"] : (function () { throw new RuntimeError('Variable "editBackgroundImage" does not exist.', 39, $this->source); })())) {
// line 40
echo "\t\t\t\t\t\t";
if (twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relation", ((isset($context["hasBackground"]) || array_key_exists("hasBackground", $context) ? $context["hasBackground"] : (function () { throw new RuntimeError('Variable "hasBackground" does not exist.', 40, $this->source); })()) . "-I")), "getElement", [], "method", true, true, true, 40)) {
// line 41
echo "\t\t\t\t\t\t\t";
// line 42
echo "\t\t\t\t\t\t\t";
$context["bgImageObject"] = twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relation", ($this->sandbox->ensureToStringAllowed((isset($context["hasBackground"]) || array_key_exists("hasBackground", $context) ? $context["hasBackground"] : (function () { throw new RuntimeError('Variable "hasBackground" does not exist.', 42, $this->source); })()), 42, $this->source) . "-I")), "getElement", [], "method", false, false, true, 42);
// line 43
echo "\t\t\t\t\t\t";
}
// line 44
echo "\t\t\t\t\t";
}
// line 45
echo "\t\t\t\t\t";
$context["bgClass"] = twig_get_attribute($this->env, $this->source, (isset($context["bgObject"]) || array_key_exists("bgObject", $context) ? $context["bgObject"] : (function () { throw new RuntimeError('Variable "bgObject" does not exist.', 45, $this->source); })()), "getClassString", [(isset($context["bgImageObject"]) || array_key_exists("bgImageObject", $context) ? $context["bgImageObject"] : (function () { throw new RuntimeError('Variable "bgImageObject" does not exist.', 45, $this->source); })())], "method", false, false, true, 45);
// line 46
echo "\t\t\t\t\t";
$context["bgContentClass"] = twig_get_attribute($this->env, $this->source, (isset($context["bgObject"]) || array_key_exists("bgObject", $context) ? $context["bgObject"] : (function () { throw new RuntimeError('Variable "bgObject" does not exist.', 46, $this->source); })()), "getBgClassString", [(isset($context["bgImageObject"]) || array_key_exists("bgImageObject", $context) ? $context["bgImageObject"] : (function () { throw new RuntimeError('Variable "bgImageObject" does not exist.', 46, $this->source); })())], "method", false, false, true, 46);
// line 47
echo "\t\t\t\t\t";
$context["bgBackgroundClass"] = twig_get_attribute($this->env, $this->source, (isset($context["bgObject"]) || array_key_exists("bgObject", $context) ? $context["bgObject"] : (function () { throw new RuntimeError('Variable "bgObject" does not exist.', 47, $this->source); })()), "getContentClassString", [(isset($context["bgImageObject"]) || array_key_exists("bgImageObject", $context) ? $context["bgImageObject"] : (function () { throw new RuntimeError('Variable "bgImageObject" does not exist.', 47, $this->source); })())], "method", false, false, true, 47);
// line 48
echo "\t\t\t\t\t";
$context["bgStyle"] = twig_get_attribute($this->env, $this->source, (isset($context["bgObject"]) || array_key_exists("bgObject", $context) ? $context["bgObject"] : (function () { throw new RuntimeError('Variable "bgObject" does not exist.', 48, $this->source); })()), "getStyleString", [(isset($context["bgImageObject"]) || array_key_exists("bgImageObject", $context) ? $context["bgImageObject"] : (function () { throw new RuntimeError('Variable "bgImageObject" does not exist.', 48, $this->source); })())], "method", false, false, true, 48);
// line 49
echo "
\t\t\t\t\t";
// line 50
$context["editBackgroundYoutube"] = twig_get_attribute($this->env, $this->source, (isset($context["bgObject"]) || array_key_exists("bgObject", $context) ? $context["bgObject"] : (function () { throw new RuntimeError('Variable "bgObject" does not exist.', 50, $this->source); })()), "getAllowYoutube", [], "method", false, false, true, 50);
// line 51
echo "\t\t\t\t\t";
if ((isset($context["editBackgroundYoutube"]) || array_key_exists("editBackgroundYoutube", $context) ? $context["editBackgroundYoutube"] : (function () { throw new RuntimeError('Variable "editBackgroundYoutube" does not exist.', 51, $this->source); })())) {
// line 52
echo "\t\t\t\t\t\t";
if (twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relation", ((isset($context["hasBackground"]) || array_key_exists("hasBackground", $context) ? $context["hasBackground"] : (function () { throw new RuntimeError('Variable "hasBackground" does not exist.', 52, $this->source); })()) . "-Y")), "getElement", [], "method", true, true, true, 52)) {
// line 53
echo "\t\t\t\t\t\t\t";
// line 54
echo "\t\t\t\t\t\t\t";
$context["bgYoutubeHref"] = twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relation", ($this->sandbox->ensureToStringAllowed((isset($context["hasBackground"]) || array_key_exists("hasBackground", $context) ? $context["hasBackground"] : (function () { throw new RuntimeError('Variable "hasBackground" does not exist.', 54, $this->source); })()), 54, $this->source) . "-Y")), "getElement", [], "method", false, false, true, 54);
// line 55
echo "\t\t\t\t\t\t\t";
$context["bgYoutubeInfo"] = FoxHabbit\BasisBundle\Tool\Video::videoGetInfoFromHref($this->sandbox->ensureToStringAllowed((isset($context["bgYoutubeHref"]) || array_key_exists("bgYoutubeHref", $context) ? $context["bgYoutubeHref"] : (function () { throw new RuntimeError('Variable "bgYoutubeHref" does not exist.', 55, $this->source); })()), 55, $this->source));
// line 56
echo "\t\t\t\t\t\t\t";
$context["youtubeId"] = ((twig_get_attribute($this->env, $this->source, ($context["bgYoutubeInfo"] ?? null), "id", [], "any", true, true, true, 56)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, ($context["bgYoutubeInfo"] ?? null), "id", [], "any", false, false, true, 56), 56, $this->source), null)) : (null));
// line 57
echo "\t\t\t\t\t\t\t";
if ((isset($context["youtubeId"]) || array_key_exists("youtubeId", $context) ? $context["youtubeId"] : (function () { throw new RuntimeError('Variable "youtubeId" does not exist.', 57, $this->source); })())) {
// line 58
echo "\t\t\t\t\t\t\t\t";
if ( !(isset($context["id"]) || array_key_exists("id", $context) ? $context["id"] : (function () { throw new RuntimeError('Variable "id" does not exist.', 58, $this->source); })())) {
// line 59
echo "\t\t\t\t\t\t\t\t\t";
$context["id"] = "yt-player";
// line 60
echo "\t\t\t\t\t\t\t\t\t";
if (twig_get_attribute($this->env, $this->source, ($context["context"] ?? null), "brick", [], "any", true, true, true, 60)) {
// line 61
echo "\t\t\t\t\t\t\t\t\t\t";
$context["id"] = (($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["context"]) || array_key_exists("context", $context) ? $context["context"] : (function () { throw new RuntimeError('Variable "context" does not exist.', 61, $this->source); })()), "brick", [], "any", false, false, true, 61), "id", [], "any", false, false, true, 61), 61, $this->source) . "-") . $this->sandbox->ensureToStringAllowed((isset($context["id"]) || array_key_exists("id", $context) ? $context["id"] : (function () { throw new RuntimeError('Variable "id" does not exist.', 61, $this->source); })()), 61, $this->source));
// line 62
echo "\t\t\t\t\t\t\t\t\t";
}
// line 63
echo "\t\t\t\t\t\t\t\t\t";
$context["id"] = (($this->sandbox->ensureToStringAllowed((isset($context["id"]) || array_key_exists("id", $context) ? $context["id"] : (function () { throw new RuntimeError('Variable "id" does not exist.', 63, $this->source); })()), 63, $this->source) . "-") . twig_random($this->env));
// line 64
echo "\t\t\t\t\t\t\t\t";
}
// line 65
echo "\t\t\t\t\t\t\t\t";
$context["youtubePlayerProperty"] = ["videoURL" => // line 66
(isset($context["youtubeId"]) || array_key_exists("youtubeId", $context) ? $context["youtubeId"] : (function () { throw new RuntimeError('Variable "youtubeId" does not exist.', 66, $this->source); })()), "containment" => ("#" . $this->sandbox->ensureToStringAllowed( // line 67
(isset($context["id"]) || array_key_exists("id", $context) ? $context["id"] : (function () { throw new RuntimeError('Variable "id" does not exist.', 67, $this->source); })()), 67, $this->source)), "showControls" => false, "showAnnotations" => false, "showYTLogo" => false, "addRaster" => false, "autoPlay" => ! // line 72
(isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 72, $this->source); })()), "mute" => true, "startAt" => 0, "opacity" => 1, "playOnlyIfVisible" => true, "stopMovieOnBlur" => true, "loop" => 1, "coverImage" => twig_get_attribute($this->env, $this->source, // line 79
(isset($context["bgYoutubeInfo"]) || array_key_exists("bgYoutubeInfo", $context) ? $context["bgYoutubeInfo"] : (function () { throw new RuntimeError('Variable "bgYoutubeInfo" does not exist.', 79, $this->source); })()), "thumbnailLarge", [], "any", false, false, true, 79)];
// line 81
echo "\t\t\t\t\t\t\t\t";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(((twig_get_attribute($this->env, $this->source, $context["element"], "mbYTparams", [], "any", true, true, true, 81)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, $context["element"], "mbYTparams", [], "any", false, false, true, 81), [])) : ([])));
foreach ($context['_seq'] as $context["mbytproperty"] => $context["mbytvalue"]) {
// line 82
echo "\t\t\t\t\t\t\t\t\t";
$context["youtubePlayerProperty"] = twig_array_merge($this->sandbox->ensureToStringAllowed((isset($context["youtubePlayerProperty"]) || array_key_exists("youtubePlayerProperty", $context) ? $context["youtubePlayerProperty"] : (function () { throw new RuntimeError('Variable "youtubePlayerProperty" does not exist.', 82, $this->source); })()), 82, $this->source), [$context["mbytproperty"] => $context["mbytvalue"]]);
// line 83
echo "\t\t\t\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['mbytproperty'], $context['mbytvalue'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 84
echo "\t\t\t\t\t\t\t\t";
if ((isset($context["bgClass"]) || array_key_exists("bgClass", $context) ? $context["bgClass"] : (function () { throw new RuntimeError('Variable "bgClass" does not exist.', 84, $this->source); })())) {
// line 85
echo "\t\t\t\t\t\t\t\t\t";
$context["bgClass"] = ($this->sandbox->ensureToStringAllowed((isset($context["bgClass"]) || array_key_exists("bgClass", $context) ? $context["bgClass"] : (function () { throw new RuntimeError('Variable "bgClass" does not exist.', 85, $this->source); })()), 85, $this->source) . " has-background-video");
// line 86
echo "\t\t\t\t\t\t\t\t";
} else {
// line 87
echo "\t\t\t\t\t\t\t\t\t";
$context["bgClass"] = "has-background-video";
// line 88
echo "\t\t\t\t\t\t\t\t";
}
// line 89
echo "\t\t\t\t\t\t\t";
}
// line 90
echo "\t\t\t\t\t\t";
}
// line 91
echo "\t\t\t\t\t";
}
// line 92
echo "\t\t\t\t\t";
$context["editBackgroundAssetVideo"] = twig_get_attribute($this->env, $this->source, (isset($context["bgObject"]) || array_key_exists("bgObject", $context) ? $context["bgObject"] : (function () { throw new RuntimeError('Variable "bgObject" does not exist.', 92, $this->source); })()), "getAllowAssetVideo", [], "method", false, false, true, 92);
// line 93
echo "\t\t\t\t\t";
if ((isset($context["editBackgroundAssetVideo"]) || array_key_exists("editBackgroundAssetVideo", $context) ? $context["editBackgroundAssetVideo"] : (function () { throw new RuntimeError('Variable "editBackgroundAssetVideo" does not exist.', 93, $this->source); })())) {
// line 94
echo "\t\t\t\t\t\t";
if (twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relation", ((isset($context["hasBackground"]) || array_key_exists("hasBackground", $context) ? $context["hasBackground"] : (function () { throw new RuntimeError('Variable "hasBackground" does not exist.', 94, $this->source); })()) . "-V")), "getElement", [], "method", true, true, true, 94)) {
// line 95
echo "\t\t\t\t\t\t\t";
$context["bgAssetVideo"] = twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relation", ($this->sandbox->ensureToStringAllowed((isset($context["hasBackground"]) || array_key_exists("hasBackground", $context) ? $context["hasBackground"] : (function () { throw new RuntimeError('Variable "hasBackground" does not exist.', 95, $this->source); })()), 95, $this->source) . "-V")), "getElement", [], "method", false, false, true, 95);
// line 96
echo "\t\t\t\t\t\t\t";
if ((isset($context["bgAssetVideo"]) || array_key_exists("bgAssetVideo", $context) ? $context["bgAssetVideo"] : (function () { throw new RuntimeError('Variable "bgAssetVideo" does not exist.', 96, $this->source); })())) {
// line 97
echo "\t\t\t\t\t\t\t\t";
$context["bgAssetVideoConfig"] = ["attributes" => ["controls" => "", "autoplay" => "autoplay", "muted" => "muted", "loop" => "loop", "class" => ("bg-asset-video-player " . $this->sandbox->ensureToStringAllowed( // line 103
(isset($context["bgBackgroundClass"]) || array_key_exists("bgBackgroundClass", $context) ? $context["bgBackgroundClass"] : (function () { throw new RuntimeError('Variable "bgBackgroundClass" does not exist.', 103, $this->source); })()), 103, $this->source)), "style" => // line 104
(isset($context["bgStyle"]) || array_key_exists("bgStyle", $context) ? $context["bgStyle"] : (function () { throw new RuntimeError('Variable "bgStyle" does not exist.', 104, $this->source); })())], "removeAttributes" => ["width", "height"]];
// line 108
echo "\t\t\t\t\t\t\t\t";
$context["bgClass"] = ($this->sandbox->ensureToStringAllowed((isset($context["bgContentClass"]) || array_key_exists("bgContentClass", $context) ? $context["bgContentClass"] : (function () { throw new RuntimeError('Variable "bgContentClass" does not exist.', 108, $this->source); })()), 108, $this->source) . " has-background-video");
// line 109
echo "\t\t\t\t\t\t\t\t";
$context["bgStyle"] = false;
// line 110
echo "\t\t\t\t\t\t\t";
}
// line 111
echo "\t\t\t\t\t\t";
}
// line 112
echo "\t\t\t\t\t";
}
// line 113
echo "
\t\t\t\t";
} else {
// line 115
echo "\t\t\t\t\t";
// line 116
echo "\t\t\t\t\t";
if (twig_get_attribute($this->env, $this->source, $context["element"], "default_bg_class", [], "any", true, true, true, 116)) {
// line 117
echo "\t\t\t\t\t\t";
// line 118
echo "\t\t\t\t\t\t";
$context["bgClass"] = twig_get_attribute($this->env, $this->source, $context["element"], "default_bg_class", [], "any", false, false, true, 118);
// line 119
echo "\t\t\t\t\t";
}
// line 120
echo "\t\t\t\t";
}
// line 121
echo "\t\t\t\t";
if (((isset($context["class"]) || array_key_exists("class", $context) ? $context["class"] : (function () { throw new RuntimeError('Variable "class" does not exist.', 121, $this->source); })()) && (isset($context["bgClass"]) || array_key_exists("bgClass", $context) ? $context["bgClass"] : (function () { throw new RuntimeError('Variable "bgClass" does not exist.', 121, $this->source); })()))) {
// line 122
echo "\t\t\t\t\t";
$context["class"] = (($this->sandbox->ensureToStringAllowed((isset($context["class"]) || array_key_exists("class", $context) ? $context["class"] : (function () { throw new RuntimeError('Variable "class" does not exist.', 122, $this->source); })()), 122, $this->source) . " ") . $this->sandbox->ensureToStringAllowed((isset($context["bgClass"]) || array_key_exists("bgClass", $context) ? $context["bgClass"] : (function () { throw new RuntimeError('Variable "bgClass" does not exist.', 122, $this->source); })()), 122, $this->source));
// line 123
echo "\t\t\t\t";
} elseif ((isset($context["bgClass"]) || array_key_exists("bgClass", $context) ? $context["bgClass"] : (function () { throw new RuntimeError('Variable "bgClass" does not exist.', 123, $this->source); })())) {
// line 124
echo "\t\t\t\t\t";
$context["class"] = (isset($context["bgClass"]) || array_key_exists("bgClass", $context) ? $context["bgClass"] : (function () { throw new RuntimeError('Variable "bgClass" does not exist.', 124, $this->source); })());
// line 125
echo "\t\t\t\t";
}
// line 126
echo "\t\t\t\t";
if (((isset($context["style"]) || array_key_exists("style", $context) ? $context["style"] : (function () { throw new RuntimeError('Variable "style" does not exist.', 126, $this->source); })()) && (isset($context["bgClass"]) || array_key_exists("bgClass", $context) ? $context["bgClass"] : (function () { throw new RuntimeError('Variable "bgClass" does not exist.', 126, $this->source); })()))) {
// line 127
echo "\t\t\t\t\t";
$context["style"] = (($this->sandbox->ensureToStringAllowed((isset($context["style"]) || array_key_exists("style", $context) ? $context["style"] : (function () { throw new RuntimeError('Variable "style" does not exist.', 127, $this->source); })()), 127, $this->source) . " ") . $this->sandbox->ensureToStringAllowed((isset($context["bgStyle"]) || array_key_exists("bgStyle", $context) ? $context["bgStyle"] : (function () { throw new RuntimeError('Variable "bgStyle" does not exist.', 127, $this->source); })()), 127, $this->source));
// line 128
echo "\t\t\t\t";
} elseif ((isset($context["bgClass"]) || array_key_exists("bgClass", $context) ? $context["bgClass"] : (function () { throw new RuntimeError('Variable "bgClass" does not exist.', 128, $this->source); })())) {
// line 129
echo "\t\t\t\t\t";
$context["style"] = (isset($context["bgStyle"]) || array_key_exists("bgStyle", $context) ? $context["bgStyle"] : (function () { throw new RuntimeError('Variable "bgStyle" does not exist.', 129, $this->source); })());
// line 130
echo "\t\t\t\t";
}
// line 131
echo "\t\t\t";
}
// line 132
echo "\t\t\t";
if (((($context["idx"] == 0) && array_key_exists("outerClass", $context)) && (isset($context["outerClass"]) || array_key_exists("outerClass", $context) ? $context["outerClass"] : (function () { throw new RuntimeError('Variable "outerClass" does not exist.', 132, $this->source); })()))) {
// line 133
echo "\t\t\t\t";
if ((isset($context["class"]) || array_key_exists("class", $context) ? $context["class"] : (function () { throw new RuntimeError('Variable "class" does not exist.', 133, $this->source); })())) {
// line 134
echo "\t\t\t\t\t";
$context["class"] = (($this->sandbox->ensureToStringAllowed((isset($context["class"]) || array_key_exists("class", $context) ? $context["class"] : (function () { throw new RuntimeError('Variable "class" does not exist.', 134, $this->source); })()), 134, $this->source) . " ") . $this->sandbox->ensureToStringAllowed((isset($context["outerClass"]) || array_key_exists("outerClass", $context) ? $context["outerClass"] : (function () { throw new RuntimeError('Variable "outerClass" does not exist.', 134, $this->source); })()), 134, $this->source));
// line 135
echo "\t\t\t\t";
} else {
// line 136
echo "\t\t\t\t\t";
$context["class"] = (isset($context["outerClass"]) || array_key_exists("outerClass", $context) ? $context["outerClass"] : (function () { throw new RuntimeError('Variable "outerClass" does not exist.', 136, $this->source); })());
// line 137
echo "\t\t\t\t";
}
// line 138
echo "\t\t\t";
}
// line 139
echo "\t\t\t";
if (((($context["idx"] == 0) && array_key_exists("outerAttributes", $context)) && (isset($context["outerAttributes"]) || array_key_exists("outerAttributes", $context) ? $context["outerAttributes"] : (function () { throw new RuntimeError('Variable "outerAttributes" does not exist.', 139, $this->source); })()))) {
// line 140
echo "\t\t\t\t";
// line 141
echo "\t\t\t";
} else {
// line 142
echo "\t\t\t\t";
$context["outerAttributes"] = null;
// line 143
echo "\t\t\t";
}
// line 144
echo "\t\t\t<";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["element"], "tag", [], "any", false, false, true, 144), 144, $this->source), "html", null, true);
echo "
\t\t\t\t";
// line 145
if ((isset($context["id"]) || array_key_exists("id", $context) ? $context["id"] : (function () { throw new RuntimeError('Variable "id" does not exist.', 145, $this->source); })())) {
echo " id=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["id"]) || array_key_exists("id", $context) ? $context["id"] : (function () { throw new RuntimeError('Variable "id" does not exist.', 145, $this->source); })()), 145, $this->source), "html", null, true);
echo "\"";
}
// line 146
echo "\t\t\t\t";
if ((isset($context["class"]) || array_key_exists("class", $context) ? $context["class"] : (function () { throw new RuntimeError('Variable "class" does not exist.', 146, $this->source); })())) {
echo " class=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["class"]) || array_key_exists("class", $context) ? $context["class"] : (function () { throw new RuntimeError('Variable "class" does not exist.', 146, $this->source); })()), 146, $this->source), "html", null, true);
echo "\"";
}
// line 147
echo "\t\t\t\t";
if ((isset($context["style"]) || array_key_exists("style", $context) ? $context["style"] : (function () { throw new RuntimeError('Variable "style" does not exist.', 147, $this->source); })())) {
echo " style=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["style"]) || array_key_exists("style", $context) ? $context["style"] : (function () { throw new RuntimeError('Variable "style" does not exist.', 147, $this->source); })()), 147, $this->source), "html", null, true);
echo "\"";
}
// line 148
echo "\t\t\t\t";
if (twig_get_attribute($this->env, $this->source, $context["element"], "href", [], "any", true, true, true, 148)) {
echo " href=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["element"], "href", [], "any", false, false, true, 148), 148, $this->source), "html", null, true);
echo "\"";
}
// line 149
echo "\t\t\t\t";
if (twig_get_attribute($this->env, $this->source, $context["element"], "target", [], "any", true, true, true, 149)) {
echo " target=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["element"], "target", [], "any", false, false, true, 149), 149, $this->source), "html", null, true);
echo "\"";
}
// line 150
echo "\t\t\t\t";
if (twig_get_attribute($this->env, $this->source, $context["element"], "attr", [], "any", true, true, true, 150)) {
// line 151
echo "\t\t\t\t\t";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["element"], "attr", [], "any", false, false, true, 151));
foreach ($context['_seq'] as $context["attrTag"] => $context["attrValue"]) {
// line 152
echo "\t\t\t\t\t\t";
if (($context["attrValue"] === true)) {
echo " ";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed($context["attrTag"], 152, $this->source), "html", null, true);
echo "
\t\t\t\t\t\t";
} elseif ( // line 153
$context["attrValue"]) {
echo " ";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed($context["attrTag"], 153, $this->source), "html", null, true);
echo "=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed($context["attrValue"], 153, $this->source), "html", null, true);
echo "\"
\t\t\t\t\t\t";
}
// line 155
echo "\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['attrTag'], $context['attrValue'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 156
echo "\t\t\t\t";
}
// line 157
echo "\t\t\t\t";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["outerAttributes"]) || array_key_exists("outerAttributes", $context) ? $context["outerAttributes"] : (function () { throw new RuntimeError('Variable "outerAttributes" does not exist.', 157, $this->source); })()));
foreach ($context['_seq'] as $context["attrTag"] => $context["attrValue"]) {
// line 158
echo "\t\t\t\t\t";
if ($context["attrValue"]) {
echo " ";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed($context["attrTag"], 158, $this->source), "html", null, true);
echo "=\"";
echo twig_escape_filter($this->env, ((twig_test_iterable($context["attrValue"])) ? (json_encode($this->sandbox->ensureToStringAllowed($context["attrValue"], 158, $this->source))) : ($context["attrValue"])), "html", null, true);
echo "\"";
}
// line 159
echo "\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['attrTag'], $context['attrValue'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 160
echo "\t\t\t>
\t\t\t";
// line 162
echo "\t\t\t";
if ((isset($context["youtubePlayerProperty"]) || array_key_exists("youtubePlayerProperty", $context) ? $context["youtubePlayerProperty"] : (function () { throw new RuntimeError('Variable "youtubePlayerProperty" does not exist.', 162, $this->source); })())) {
// line 163
echo "\t\t\t\t<div class=\"d-none background-video background-video-youtube player\" data-property=\"";
echo twig_escape_filter($this->env, json_encode($this->sandbox->ensureToStringAllowed((isset($context["youtubePlayerProperty"]) || array_key_exists("youtubePlayerProperty", $context) ? $context["youtubePlayerProperty"] : (function () { throw new RuntimeError('Variable "youtubePlayerProperty" does not exist.', 163, $this->source); })()), 163, $this->source)), "html", null, true);
echo "\"></div>
\t\t\t";
}
// line 165
echo "\t\t\t";
if (((isset($context["bgAssetVideo"]) || array_key_exists("bgAssetVideo", $context) ? $context["bgAssetVideo"] : (function () { throw new RuntimeError('Variable "bgAssetVideo" does not exist.', 165, $this->source); })()) && (isset($context["bgAssetVideoConfig"]) || array_key_exists("bgAssetVideoConfig", $context) ? $context["bgAssetVideoConfig"] : (function () { throw new RuntimeError('Variable "bgAssetVideoConfig" does not exist.', 165, $this->source); })()))) {
// line 166
echo "\t\t\t\t";
echo FoxHabbit\BasisBundle\Tool\Video::videoGetPlayerFromObject($this->sandbox->ensureToStringAllowed((isset($context["bgAssetVideo"]) || array_key_exists("bgAssetVideo", $context) ? $context["bgAssetVideo"] : (function () { throw new RuntimeError('Variable "bgAssetVideo" does not exist.', 166, $this->source); })()), 166, $this->source), $this->sandbox->ensureToStringAllowed((isset($context["bgAssetVideoConfig"]) || array_key_exists("bgAssetVideoConfig", $context) ? $context["bgAssetVideoConfig"] : (function () { throw new RuntimeError('Variable "bgAssetVideoConfig" does not exist.', 166, $this->source); })()), 166, $this->source), $this->sandbox->ensureToStringAllowed((isset($context["bgImageObject"]) || array_key_exists("bgImageObject", $context) ? $context["bgImageObject"] : (function () { throw new RuntimeError('Variable "bgImageObject" does not exist.', 166, $this->source); })()), 166, $this->source));
echo "
\t\t\t";
}
// line 168
echo "\t\t\t";
// line 169
echo "\t\t\t";
if (((isset($context["hasBackground"]) || array_key_exists("hasBackground", $context) ? $context["hasBackground"] : (function () { throw new RuntimeError('Variable "hasBackground" does not exist.', 169, $this->source); })()) && (isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 169, $this->source); })()))) {
// line 170
echo "\t\t\t\t";
$context["bgEditClass"] = ("basisbundle_edit_line " . ((twig_get_attribute($this->env, $this->source, $context["element"], "bg_edit_class", [], "any", true, true, true, 170)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["element"], "bg_edit_class", [], "any", false, false, true, 170), 170, $this->source), "")) : ("")));
// line 171
echo "\t\t\t\t<div class=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["bgEditClass"]) || array_key_exists("bgEditClass", $context) ? $context["bgEditClass"] : (function () { throw new RuntimeError('Variable "bgEditClass" does not exist.', 171, $this->source); })()), 171, $this->source), "html", null, true);
echo "\">
\t\t\t\t\t<div class=\"basisbundle_edit_entry\">
\t\t\t\t\t\t<div class=\"basisbundle_edit_label\">Background:</div>
\t\t\t\t\t\t<div class=\"basisbundle_edit_input\">";
// line 174
echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relation", ($this->sandbox->ensureToStringAllowed((isset($context["hasBackground"]) || array_key_exists("hasBackground", $context) ? $context["hasBackground"] : (function () { throw new RuntimeError('Variable "hasBackground" does not exist.', 174, $this->source); })()), 174, $this->source) . "-O"), ["reload" => true, "types" => ["object"], "subtypes" => ["object" => ["object"]]]);
echo "</div>
\t\t\t\t\t</div>
\t\t\t\t\t";
// line 176
if ((isset($context["editBackgroundImage"]) || array_key_exists("editBackgroundImage", $context) ? $context["editBackgroundImage"] : (function () { throw new RuntimeError('Variable "editBackgroundImage" does not exist.', 176, $this->source); })())) {
// line 177
echo "\t\t\t\t\t\t<div class=\"basisbundle_edit_entry\">
\t\t\t\t\t\t\t<div class=\"basisbundle_edit_label\">Image:</div>
\t\t\t\t\t\t\t<div class=\"basisbundle_edit_input\">";
// line 179
echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relation", ($this->sandbox->ensureToStringAllowed((isset($context["hasBackground"]) || array_key_exists("hasBackground", $context) ? $context["hasBackground"] : (function () { throw new RuntimeError('Variable "hasBackground" does not exist.', 179, $this->source); })()), 179, $this->source) . "-I"), ["reload" => true, "types" => ["asset"], "subtypes" => ["asset" => ["image"]]]);
echo "</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t";
}
// line 182
echo "\t\t\t\t\t";
if ((isset($context["editBackgroundYoutube"]) || array_key_exists("editBackgroundYoutube", $context) ? $context["editBackgroundYoutube"] : (function () { throw new RuntimeError('Variable "editBackgroundYoutube" does not exist.', 182, $this->source); })())) {
// line 183
echo "\t\t\t\t\t\t<div class=\"basisbundle_edit_entry\">
\t\t\t\t\t\t\t<div class=\"basisbundle_edit_label\">YouTube:</div>
\t\t\t\t\t\t\t<div class=\"basisbundle_edit_input\">";
// line 185
echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relation", ($this->sandbox->ensureToStringAllowed((isset($context["hasBackground"]) || array_key_exists("hasBackground", $context) ? $context["hasBackground"] : (function () { throw new RuntimeError('Variable "hasBackground" does not exist.', 185, $this->source); })()), 185, $this->source) . "-Y"), ["reload" => true, "types" => ["document"], "subtypes" => ["document" => ["link"]]]);
echo "</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t";
}
// line 188
echo "\t\t\t\t\t";
if ((isset($context["editBackgroundAssetVideo"]) || array_key_exists("editBackgroundAssetVideo", $context) ? $context["editBackgroundAssetVideo"] : (function () { throw new RuntimeError('Variable "editBackgroundAssetVideo" does not exist.', 188, $this->source); })())) {
// line 189
echo "\t\t\t\t\t\t<div class=\"basisbundle_edit_entry\">
\t\t\t\t\t\t\t<div class=\"basisbundle_edit_label\">Video:</div>
\t\t\t\t\t\t\t<div class=\"basisbundle_edit_input\">";
// line 191
echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relation", ($this->sandbox->ensureToStringAllowed((isset($context["hasBackground"]) || array_key_exists("hasBackground", $context) ? $context["hasBackground"] : (function () { throw new RuntimeError('Variable "hasBackground" does not exist.', 191, $this->source); })()), 191, $this->source) . "-V"), ["reload" => true, "types" => ["asset"], "subtypes" => ["asset" => ["video"]]]);
echo "</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t";
}
// line 194
echo "\t\t\t\t</div>
\t\t\t";
}
// line 196
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['idx'], $context['element'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 197
echo " ";
}
// line 198
echo " ";
$___internal_parse_8_ = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
// line 2
echo twig_spaceless($___internal_parse_8_);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return ('' === $tmp = ob_get_contents()) ? '' : new Markup($tmp, $this->env->getCharset());
} finally {
ob_end_clean();
}
}
// line 201
public function macro_wrapperClose($__wrapperConfig__ = null, ...$__varargs__)
{
$macros = $this->macros;
$context = $this->env->mergeGlobals([
"wrapperConfig" => $__wrapperConfig__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start();
try {
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro", "wrapperClose"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro", "wrapperClose"));
// line 202
ob_start();
// line 203
echo " ";
if (twig_test_iterable((isset($context["wrapperConfig"]) || array_key_exists("wrapperConfig", $context) ? $context["wrapperConfig"] : (function () { throw new RuntimeError('Variable "wrapperConfig" does not exist.', 203, $this->source); })()))) {
// line 204
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_reverse_filter($this->env, (isset($context["wrapperConfig"]) || array_key_exists("wrapperConfig", $context) ? $context["wrapperConfig"] : (function () { throw new RuntimeError('Variable "wrapperConfig" does not exist.', 204, $this->source); })())));
foreach ($context['_seq'] as $context["_key"] => $context["element"]) {
// line 205
echo " </";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["element"], "tag", [], "any", false, false, true, 205), 205, $this->source), "html", null, true);
echo ">
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['element'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 207
echo " ";
}
// line 208
echo " ";
$___internal_parse_9_ = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
// line 202
echo twig_spaceless($___internal_parse_9_);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return ('' === $tmp = ob_get_contents()) ? '' : new Markup($tmp, $this->env->getCharset());
} finally {
ob_end_clean();
}
}
public function getTemplateName()
{
return "@FoxHabbitBasis/Macro/wrap.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 675 => 202, 672 => 208, 669 => 207, 660 => 205, 655 => 204, 652 => 203, 650 => 202, 631 => 201, 616 => 2, 613 => 198, 610 => 197, 604 => 196, 600 => 194, 594 => 191, 590 => 189, 587 => 188, 581 => 185, 577 => 183, 574 => 182, 568 => 179, 564 => 177, 562 => 176, 557 => 174, 550 => 171, 547 => 170, 544 => 169, 542 => 168, 536 => 166, 533 => 165, 527 => 163, 524 => 162, 521 => 160, 515 => 159, 506 => 158, 501 => 157, 498 => 156, 492 => 155, 483 => 153, 476 => 152, 471 => 151, 468 => 150, 461 => 149, 454 => 148, 447 => 147, 440 => 146, 434 => 145, 429 => 144, 426 => 143, 423 => 142, 420 => 141, 418 => 140, 415 => 139, 412 => 138, 409 => 137, 406 => 136, 403 => 135, 400 => 134, 397 => 133, 394 => 132, 391 => 131, 388 => 130, 385 => 129, 382 => 128, 379 => 127, 376 => 126, 373 => 125, 370 => 124, 367 => 123, 364 => 122, 361 => 121, 358 => 120, 355 => 119, 352 => 118, 350 => 117, 347 => 116, 345 => 115, 341 => 113, 338 => 112, 335 => 111, 332 => 110, 329 => 109, 326 => 108, 324 => 104, 323 => 103, 321 => 97, 318 => 96, 315 => 95, 312 => 94, 309 => 93, 306 => 92, 303 => 91, 300 => 90, 297 => 89, 294 => 88, 291 => 87, 288 => 86, 285 => 85, 282 => 84, 276 => 83, 273 => 82, 268 => 81, 266 => 79, 265 => 72, 264 => 67, 263 => 66, 261 => 65, 258 => 64, 255 => 63, 252 => 62, 249 => 61, 246 => 60, 243 => 59, 240 => 58, 237 => 57, 234 => 56, 231 => 55, 228 => 54, 226 => 53, 223 => 52, 220 => 51, 218 => 50, 215 => 49, 212 => 48, 209 => 47, 206 => 46, 203 => 45, 200 => 44, 197 => 43, 194 => 42, 192 => 41, 189 => 40, 186 => 39, 183 => 38, 180 => 37, 177 => 36, 174 => 35, 171 => 34, 169 => 33, 166 => 32, 163 => 31, 160 => 30, 157 => 29, 154 => 28, 152 => 27, 149 => 26, 146 => 25, 143 => 24, 140 => 23, 137 => 22, 134 => 21, 131 => 20, 128 => 19, 125 => 18, 122 => 17, 119 => 16, 116 => 15, 113 => 14, 110 => 13, 107 => 12, 104 => 11, 101 => 10, 98 => 9, 93 => 8, 91 => 7, 88 => 6, 85 => 5, 82 => 4, 80 => 3, 78 => 2, 56 => 1, 45 => 200,);
}
public function getSourceContext()
{
return new Source("{% macro wrapperOpen( wrapperConfig, context, outerClass, outerAttributes) -%}
{%- apply spaceless %}
\t{# variablen aus dem context setzen, damit die Pimcore Editables funktionieren #}
\t{% set editmode = context.editmode %}
\t{% set document = context.document %}
{% if wrapperConfig is iterable %}
\t\t{% for idx,element in wrapperConfig %}
\t\t\t{% set hasBackground = element.bg_edit_prefix|default(false) %}
\t\t\t{% set editBackgroundImage = false %}
\t\t\t{% set editBackgroundYoutube = false %}
\t\t\t{% set editBackgroundAssetVideo = false %}
\t\t\t{% if element.editmode_class is defined and editmode %}
\t\t\t\t{% set class = element.editmode_class %}
\t\t\t{% else %}
\t\t\t\t{% set class = element.class %}
\t\t\t{% endif %}
\t\t\t{% set style = null %}
\t\t\t{% set id = null %}
\t\t\t{% set ytDivId = 'yt-player' %}
\t\t\t{% set youtubePlayerProperty = null %}
\t\t\t{% set youtubePlayerDivId = null %}
\t\t\t{% set bgAssetVideoConfig = null %}
\t\t\t{% set bgAssetVideo = null %}
\t\t\t{% set bgImageObject = null %}
\t\t\t{% if hasBackground %}
\t\t\t\t{# es kann ein Hintergrund gepflegt werden #}
\t\t\t\t{% set bgClass = null %}
\t\t\t\t{% set bgContentClass = null %}
\t\t\t\t{% set bgBackgroundClass = null %}
\t\t\t\t{% set bgStyle = null %}
\t\t\t\t{% if pimcore_relation( hasBackground ~ '-O').getElement() %}
\t\t\t\t\t{# es ist ein Hintergrund-Obkjekt eingepflegt #}
\t\t\t\t\t{% set bgObject = pimcore_relation( hasBackground ~ '-O').getElement() %}
\t\t\t\t\t{% if element.bg_thumbnail is defined %}
\t\t\t\t\t\t{% do bgObject.setThumbnail(element.bg_thumbnail) %}
\t\t\t\t\t{% endif %}
\t\t\t\t\t{% set editBackgroundImage = bgObject.canAddImage() %}
\t\t\t\t\t{% if editBackgroundImage %}
\t\t\t\t\t\t{% if pimcore_relation( hasBackground ~ '-I').getElement() is defined %}
\t\t\t\t\t\t\t{# es ist ein Hintergrund-Bild eingepflegt #}
\t\t\t\t\t\t\t{% set bgImageObject = pimcore_relation( hasBackground ~ '-I').getElement() %}
\t\t\t\t\t\t{% endif %}
\t\t\t\t\t{% endif %}
\t\t\t\t\t{% set bgClass = bgObject.getClassString(bgImageObject) %}
\t\t\t\t\t{% set bgContentClass = bgObject.getBgClassString(bgImageObject) %}
\t\t\t\t\t{% set bgBackgroundClass = bgObject.getContentClassString(bgImageObject) %}
\t\t\t\t\t{% set bgStyle = bgObject.getStyleString(bgImageObject) %}
\t\t\t\t\t{% set editBackgroundYoutube = bgObject.getAllowYoutube() %}
\t\t\t\t\t{% if editBackgroundYoutube %}
\t\t\t\t\t\t{% if pimcore_relation( hasBackground ~ '-Y').getElement() is defined %}
\t\t\t\t\t\t\t{# es ist ein YouTube Hintergrund-Video eingepflegt #}
\t\t\t\t\t\t\t{% set bgYoutubeHref = pimcore_relation( hasBackground ~ '-Y').getElement() %}
\t\t\t\t\t\t\t{% set bgYoutubeInfo = foxhabbit_common_video_get_info_from_href(bgYoutubeHref) %}
\t\t\t\t\t\t\t{% set youtubeId = bgYoutubeInfo.id|default(null) %}
\t\t\t\t\t\t\t{% if youtubeId %}
\t\t\t\t\t\t\t\t{% if not id %}
\t\t\t\t\t\t\t\t\t{% set id = 'yt-player' %}
\t\t\t\t\t\t\t\t\t{% if context.brick is defined %}
\t\t\t\t\t\t\t\t\t\t{% set id = context.brick.id ~ '-' ~ id %}
\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t{% set id = id ~ '-' ~ random() %}
\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t{% set youtubePlayerProperty = {
\t\t\t\t\t\t\t\t\tvideoURL: youtubeId,
\t\t\t\t\t\t\t\t\tcontainment: '#' ~ id,
\t\t\t\t\t\t\t\t\tshowControls: false,
\t\t\t\t\t\t\t\t\tshowAnnotations: false,
showYTLogo: false,
\t\t\t\t\t\t\t\t\taddRaster:false,
\t\t\t\t\t\t\t\t\tautoPlay: not editmode,
\t\t\t\t\t\t\t\t\tmute:true,
\t\t\t\t\t\t\t\t\tstartAt:0,
\t\t\t\t\t\t\t\t\topacity:1,
\t\t\t\t\t\t\t\t\tplayOnlyIfVisible: true,
\t\t\t\t\t\t\t\t\tstopMovieOnBlur: true,
\t\t\t\t\t\t\t\t\tloop:1,
\t\t\t\t\t\t\t\t\tcoverImage: bgYoutubeInfo.thumbnailLarge
\t\t\t\t\t\t\t\t} %}
\t\t\t\t\t\t\t\t{% for mbytproperty,mbytvalue in element.mbYTparams|default({}) %}
\t\t\t\t\t\t\t\t\t{% set youtubePlayerProperty = youtubePlayerProperty|merge({(mbytproperty):mbytvalue}) %}
\t\t\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t\t\t\t{% if bgClass %}
\t\t\t\t\t\t\t\t\t{% set bgClass = bgClass ~ ' has-background-video' %}
\t\t\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t\t\t{% set bgClass = 'has-background-video' %}
\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t{% endif %}
\t\t\t\t\t{% endif %}
\t\t\t\t\t{% set editBackgroundAssetVideo = bgObject.getAllowAssetVideo() %}
\t\t\t\t\t{% if editBackgroundAssetVideo %}
\t\t\t\t\t\t{% if pimcore_relation( hasBackground ~ '-V').getElement() is defined %}
\t\t\t\t\t\t\t{% set bgAssetVideo = pimcore_relation( hasBackground ~ '-V').getElement() %}
\t\t\t\t\t\t\t{% if bgAssetVideo %}
\t\t\t\t\t\t\t\t{% set bgAssetVideoConfig = {
\t\t\t\t\t\t\t\t\tattributes: {
\t\t\t\t\t\t\t\t\t\tcontrols:'',
\t\t\t\t\t\t\t\t\t\tautoplay:'autoplay',
\t\t\t\t\t\t\t\t\t\tmuted:'muted',
\t\t\t\t\t\t\t\t\t\tloop:'loop',
\t\t\t\t\t\t\t\t\t\tclass:'bg-asset-video-player ' ~ bgBackgroundClass,
\t\t\t\t\t\t\t\t\t\tstyle:bgStyle
\t\t\t\t\t\t\t\t\t},
\t\t\t\t\t\t\t\t\tremoveAttributes: ['width','height']
\t\t\t\t\t\t\t\t} %}
\t\t\t\t\t\t\t\t{% set bgClass = bgContentClass ~ ' has-background-video' %}
\t\t\t\t\t\t\t\t{% set bgStyle = false %}
\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t{% endif %}
\t\t\t\t\t{% endif %}
\t\t\t\t{% else %}
\t\t\t\t\t{# es ist KEIN Hintergrund-Obkjekt eingepflegt #}
\t\t\t\t\t{% if element.default_bg_class is defined %}
\t\t\t\t\t\t{# Keine Klasse aus dem Hintergrund-Objekt => Default verwenden #}
\t\t\t\t\t\t{% set bgClass = element.default_bg_class %}
\t\t\t\t\t{% endif %}
\t\t\t\t{% endif %}
\t\t\t\t{% if class and bgClass %}
\t\t\t\t\t{% set class = class ~ ' ' ~ bgClass %}
\t\t\t\t{% elseif bgClass %}
\t\t\t\t\t{% set class = bgClass %}
\t\t\t\t{% endif %}
\t\t\t\t{% if style and bgClass %}
\t\t\t\t\t{% set style = style ~ ' ' ~ bgStyle %}
\t\t\t\t{% elseif bgClass %}
\t\t\t\t\t{% set style = bgStyle %}
\t\t\t\t{% endif %}
\t\t\t{% endif %}
\t\t\t{% if idx == 0 and outerClass is defined and outerClass %}
\t\t\t\t{% if class %}
\t\t\t\t\t{% set class = class ~ ' ' ~ outerClass %}
\t\t\t\t{% else %}
\t\t\t\t\t{% set class = outerClass %}
\t\t\t\t{% endif %}
\t\t\t{% endif %}
\t\t\t{% if idx == 0 and outerAttributes is defined and outerAttributes %}
\t\t\t\t{# todo: merge attributes #}
\t\t\t{% else %}
\t\t\t\t{% set outerAttributes = null %}
\t\t\t{% endif %}
\t\t\t<{{ element.tag }}
\t\t\t\t{% if id %} id=\"{{id}}\"{% endif %}
\t\t\t\t{% if class %} class=\"{{ class }}\"{% endif %}
\t\t\t\t{% if style %} style=\"{{ style }}\"{% endif %}
\t\t\t\t{% if element.href is defined %} href=\"{{element.href}}\"{% endif %}
\t\t\t\t{% if element.target is defined %} target=\"{{element.target}}\"{% endif %}
\t\t\t\t{% if element.attr is defined %}
\t\t\t\t\t{% for attrTag,attrValue in element.attr %}
\t\t\t\t\t\t{% if attrValue is same as (true) %} {{attrTag}}
\t\t\t\t\t\t{% elseif attrValue %} {{attrTag}}=\"{{ attrValue }}\"
\t\t\t\t\t\t{% endif %}
\t\t\t\t\t{% endfor %}
\t\t\t\t{% endif %}
\t\t\t\t{% for attrTag,attrValue in outerAttributes %}
\t\t\t\t\t{% if attrValue %} {{attrTag}}=\"{{ attrValue is iterable ? attrValue|json_encode : attrValue }}\"{% endif %}
\t\t\t\t{% endfor %}
\t\t\t>
\t\t\t{# Ausgabe YouTube Background Video #}
\t\t\t{% if youtubePlayerProperty %}
\t\t\t\t<div class=\"d-none background-video background-video-youtube player\" data-property=\"{{ youtubePlayerProperty|json_encode() }}\"></div>
\t\t\t{% endif %}
\t\t\t{% if bgAssetVideo and bgAssetVideoConfig %}
\t\t\t\t{{ foxhabbit_common_video_player_from_object( bgAssetVideo, bgAssetVideoConfig, bgImageObject) }}
\t\t\t{% endif %}
\t\t\t{# Anzeige Editmode für Background-Objekt, Bild und YouTube#}
\t\t\t{% if hasBackground and editmode %}
\t\t\t\t{% set bgEditClass = 'basisbundle_edit_line ' ~ element.bg_edit_class|default('') %}
\t\t\t\t<div class=\"{{ bgEditClass }}\">
\t\t\t\t\t<div class=\"basisbundle_edit_entry\">
\t\t\t\t\t\t<div class=\"basisbundle_edit_label\">Background:</div>
\t\t\t\t\t\t<div class=\"basisbundle_edit_input\">{{ pimcore_relation( hasBackground ~ '-O',{reload:true,types:['object'],subtypes:{object:['object']}}) }}</div>
\t\t\t\t\t</div>
\t\t\t\t\t{% if editBackgroundImage %}
\t\t\t\t\t\t<div class=\"basisbundle_edit_entry\">
\t\t\t\t\t\t\t<div class=\"basisbundle_edit_label\">Image:</div>
\t\t\t\t\t\t\t<div class=\"basisbundle_edit_input\">{{ pimcore_relation( hasBackground ~ '-I',{reload:true,types:['asset'],subtypes:{asset:['image']}})}}</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t{% endif %}
\t\t\t\t\t{% if editBackgroundYoutube %}
\t\t\t\t\t\t<div class=\"basisbundle_edit_entry\">
\t\t\t\t\t\t\t<div class=\"basisbundle_edit_label\">YouTube:</div>
\t\t\t\t\t\t\t<div class=\"basisbundle_edit_input\">{{ pimcore_relation( hasBackground ~ '-Y',{reload:true,types:['document'],subtypes:{document:['link']}}) }}</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t{% endif %}
\t\t\t\t\t{% if editBackgroundAssetVideo %}
\t\t\t\t\t\t<div class=\"basisbundle_edit_entry\">
\t\t\t\t\t\t\t<div class=\"basisbundle_edit_label\">Video:</div>
\t\t\t\t\t\t\t<div class=\"basisbundle_edit_input\">{{ pimcore_relation( hasBackground ~ '-V',{reload:true,types:['asset'],subtypes:{asset:['video']}}) }}</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t{% endif %}
\t\t\t\t</div>
\t\t\t{% endif %}
{% endfor %}
{% endif %}
{% endapply -%}
{%- endmacro %}
{% macro wrapperClose( wrapperConfig) -%}
{%- apply spaceless %}
{% if wrapperConfig is iterable %}
{% for element in wrapperConfig|reverse %}
</{{ element.tag }}>
{% endfor %}
{% endif %}
{% endapply -%}
{%- endmacro %}
", "@FoxHabbitBasis/Macro/wrap.html.twig", "/srv/httpd/vhosts/lorch-test/releases/51/bundles/FoxHabbit/BasisBundle/Resources/views/Macro/wrap.html.twig");
}
public function checkSecurity()
{
static $tags = array("macro" => 1, "apply" => 2, "set" => 4, "if" => 7, "for" => 8, "do" => 36);
static $filters = array("default" => 9, "merge" => 82, "escape" => 144, "json_encode" => 158, "spaceless" => 2, "reverse" => 204);
static $functions = array("pimcore_relation" => 32, "foxhabbit_common_video_get_info_from_href" => 55, "random" => 63, "foxhabbit_common_video_player_from_object" => 166);
try {
$this->sandbox->checkSecurity(
['macro', 'apply', 'set', 'if', 'for', 'do'],
['default', 'merge', 'escape', 'json_encode', 'spaceless', 'reverse'],
['pimcore_relation', 'foxhabbit_common_video_get_info_from_href', 'random', 'foxhabbit_common_video_player_from_object']
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}