<?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/area-variant.html.twig */
class __TwigTemplate_92692f3a46bc113cb89c882982fd225c 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/area-variant.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/area-variant.html.twig"));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 1
public function macro_includeVariant($__context__ = null, $__parentTemplate__ = null, $__outerClass__ = null, $__outerAttributes__ = null, ...$__varargs__)
{
$macros = $this->macros;
$context = $this->env->mergeGlobals([
"context" => $__context__,
"parentTemplate" => $__parentTemplate__,
"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", "includeVariant"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro", "includeVariant"));
// line 2
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.', 2, $this->source); })()), "editmode", [], "any", false, false, true, 2);
// line 3
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.', 3, $this->source); })()), "document", [], "any", false, false, true, 3);
// line 4
echo "\t";
$context["config"] = 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); })()), "config", [], "any", false, false, true, 4);
// line 5
echo "\t";
if (twig_get_attribute($this->env, $this->source, ($context["context"] ?? null), "brick", [], "any", true, true, true, 5)) {
// line 6
echo "\t\t";
$context["brick"] = 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.', 6, $this->source); })()), "brick", [], "any", false, false, true, 6);
// line 7
echo " ";
}
// line 8
echo "
";
// line 9
if ((((twig_get_attribute($this->env, $this->source, ($context["config"] ?? null), "disabled", [], "any", true, true, true, 9)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["config"] ?? null), "disabled", [], "any", false, false, true, 9), null)) : (null)) && (isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 9, $this->source); })()))) {
// line 10
echo " <div class=\"basisbundle_edit_line basisbundle_edit_info\">
<tt>";
// line 11
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["parentTemplate"]) || array_key_exists("parentTemplate", $context) ? $context["parentTemplate"] : (function () { throw new RuntimeError('Variable "parentTemplate" does not exist.', 11, $this->source); })()), 11, $this->source), "html", null, true);
echo "</tt>
<p><b>Warning: Areabrick is disabled</b> (";
// line 12
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["config"]) || array_key_exists("config", $context) ? $context["config"] : (function () { throw new RuntimeError('Variable "config" does not exist.', 12, $this->source); })()), "disabled", [], "any", false, false, true, 12), 12, $this->source), "html", null, true);
echo ")</p>
</div>
";
}
// line 15
echo "
\t";
// line 16
$context["variantStore"] = [];
// line 17
echo "\t";
$context["availableVariants"] = ((twig_get_attribute($this->env, $this->source, ($context["config"] ?? null), "variants", [], "any", true, true, true, 17)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, ($context["config"] ?? null), "variants", [], "any", false, false, true, 17), 17, $this->source), [])) : ([]));
// line 18
echo "\t";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["availableVariants"]) || array_key_exists("availableVariants", $context) ? $context["availableVariants"] : (function () { throw new RuntimeError('Variable "availableVariants" does not exist.', 18, $this->source); })()));
foreach ($context['_seq'] as $context["id"] => $context["variant"]) {
// line 19
echo "\t\t";
if ((twig_test_iterable($context["variant"]) && twig_get_attribute($this->env, $this->source, $context["variant"], "variant_name", [], "any", true, true, true, 19))) {
// line 20
echo "\t\t\t";
$context["varianteSelectable"] = true;
// line 21
echo "\t\t\t";
if (((twig_get_attribute($this->env, $this->source, $context["variant"], "variant_disable_user_select", [], "any", true, true, true, 21)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, $context["variant"], "variant_disable_user_select", [], "any", false, false, true, 21), false)) : (false))) {
// line 22
echo "\t\t\t\t";
$context["varianteSelectable"] = false;
// line 23
echo "\t\t\t";
}
// line 24
echo "\t\t\t";
if ((isset($context["varianteSelectable"]) || array_key_exists("varianteSelectable", $context) ? $context["varianteSelectable"] : (function () { throw new RuntimeError('Variable "varianteSelectable" does not exist.', 24, $this->source); })())) {
// line 25
echo "\t\t\t\t";
$context["variantStore"] = twig_array_merge($this->sandbox->ensureToStringAllowed((isset($context["variantStore"]) || array_key_exists("variantStore", $context) ? $context["variantStore"] : (function () { throw new RuntimeError('Variable "variantStore" does not exist.', 25, $this->source); })()), 25, $this->source), [[$context["id"], twig_get_attribute($this->env, $this->source, $context["variant"], "variant_name", [], "any", false, false, true, 25)]]);
// line 26
echo "\t\t\t";
}
// line 27
echo "\t\t";
}
// line 28
echo "\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['id'], $context['variant'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 29
echo "\t";
if (((twig_get_attribute($this->env, $this->source, ($context["context"] ?? null), "variant", [], "any", true, true, true, 29)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["context"] ?? null), "variant", [], "any", false, false, true, 29), false)) : (false))) {
// line 30
echo "\t\t";
// line 31
echo "\t\t";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["availableVariants"]) || array_key_exists("availableVariants", $context) ? $context["availableVariants"] : (function () { throw new RuntimeError('Variable "availableVariants" does not exist.', 31, $this->source); })()));
foreach ($context['_seq'] as $context["id"] => $context["variant"]) {
// line 32
echo " ";
if (($context["id"] == 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.', 32, $this->source); })()), "variant", [], "any", false, false, true, 32))) {
// line 33
echo "\t\t\t ";
$context["variantStore"] = [[$context["id"], twig_get_attribute($this->env, $this->source, $context["variant"], "variant_name", [], "any", false, false, true, 33)]];
// line 34
echo " ";
}
// line 35
echo "\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['id'], $context['variant'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 36
echo "\t";
}
// line 37
echo "\t";
$context["defaultVariant"] = ((twig_get_attribute($this->env, $this->source, ($context["context"] ?? null), "variant", [], "any", true, true, true, 37)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, ($context["context"] ?? null), "variant", [], "any", false, false, true, 37), 37, $this->source), ((twig_get_attribute($this->env, $this->source, ($context["config"] ?? null), "variant_default", [], "any", true, true, true, 37)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, ($context["config"] ?? null), "variant_default", [], "any", false, false, true, 37), 37, $this->source), "default")) : ("default")))) : (((twig_get_attribute($this->env, $this->source, ($context["config"] ?? null), "variant_default", [], "any", true, true, true, 37)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, ($context["config"] ?? null), "variant_default", [], "any", false, false, true, 37), 37, $this->source), "default")) : ("default"))));
// line 38
echo "\t";
$context["selectedVariant"] = ((twig_get_attribute($this->env, $this->source, ($context["context"] ?? null), "variant", [], "any", true, true, true, 38)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, ($context["context"] ?? null), "variant", [], "any", false, false, true, 38), 38, $this->source), ((twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "variant"), "getValue", [], "method", true, true, true, 38)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "variant"), "getValue", [], "method", false, false, true, 38), 38, $this->source), $this->sandbox->ensureToStringAllowed((isset($context["defaultVariant"]) || array_key_exists("defaultVariant", $context) ? $context["defaultVariant"] : (function () { throw new RuntimeError('Variable "defaultVariant" does not exist.', 38, $this->source); })()), 38, $this->source))) : ((isset($context["defaultVariant"]) || array_key_exists("defaultVariant", $context) ? $context["defaultVariant"] : (function () { throw new RuntimeError('Variable "defaultVariant" does not exist.', 38, $this->source); })()))))) : (((twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "variant"), "getValue", [], "method", true, true, true, 38)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "variant"), "getValue", [], "method", false, false, true, 38), 38, $this->source), $this->sandbox->ensureToStringAllowed((isset($context["defaultVariant"]) || array_key_exists("defaultVariant", $context) ? $context["defaultVariant"] : (function () { throw new RuntimeError('Variable "defaultVariant" does not exist.', 38, $this->source); })()), 38, $this->source))) : ((isset($context["defaultVariant"]) || array_key_exists("defaultVariant", $context) ? $context["defaultVariant"] : (function () { throw new RuntimeError('Variable "defaultVariant" does not exist.', 38, $this->source); })())))));
// line 39
echo "\t";
if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 39, $this->source); })())) {
// line 40
echo "\t\t";
if ((twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "variant"), "isEmpty", [], "method", false, false, true, 40) || (twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "variant"), "getValue", [], "method", false, false, true, 40) != (isset($context["selectedVariant"]) || array_key_exists("selectedVariant", $context) ? $context["selectedVariant"] : (function () { throw new RuntimeError('Variable "selectedVariant" does not exist.', 40, $this->source); })())))) {
// line 41
echo "\t\t\t";
twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "variant"), "setDataFromResource", [(isset($context["defaultVariant"]) || array_key_exists("defaultVariant", $context) ? $context["defaultVariant"] : (function () { throw new RuntimeError('Variable "defaultVariant" does not exist.', 41, $this->source); })())], "method", false, false, true, 41);
// line 42
echo "\t\t";
}
// line 43
echo "\t\t";
if ((twig_length_filter($this->env, (isset($context["variantStore"]) || array_key_exists("variantStore", $context) ? $context["variantStore"] : (function () { throw new RuntimeError('Variable "variantStore" does not exist.', 43, $this->source); })())) > 1)) {
// line 44
echo "\t\t\t<div class=\"basisbundle_edit_line\">
\t\t\t\t<div class=\"basisbundle_edit_entry\">
\t\t\t\t\t<div class=\"basisbundle_edit_label\">";
// line 46
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, ($context["config"] ?? null), "variant_label", [], "any", true, true, true, 46)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, ($context["config"] ?? null), "variant_label", [], "any", false, false, true, 46), 46, $this->source), "Choose variant")) : ("Choose variant")), "html", null, true);
echo ":</div>
\t\t\t\t\t<div class=\"basisbundle_edit_input\">";
// line 47
echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "variant", ["store" => (isset($context["variantStore"]) || array_key_exists("variantStore", $context) ? $context["variantStore"] : (function () { throw new RuntimeError('Variable "variantStore" does not exist.', 47, $this->source); })()), "reload" => true, "class" => "m-0"]);
echo "</div>
\t\t\t\t</div>
\t\t\t</div>
\t\t";
}
// line 51
echo "\t";
}
// line 52
echo "\t";
if ( !(isset($context["availableVariants"]) || array_key_exists("availableVariants", $context) ? $context["availableVariants"] : (function () { throw new RuntimeError('Variable "availableVariants" does not exist.', 52, $this->source); })())) {
// line 53
echo "\t\t<div class=\"basisbundle_edit_line basisbundle_edit_error\">
\t\t\tNo variants available for ";
// line 54
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["parentTemplate"]) || array_key_exists("parentTemplate", $context) ? $context["parentTemplate"] : (function () { throw new RuntimeError('Variable "parentTemplate" does not exist.', 54, $this->source); })()), 54, $this->source), "html", null, true);
echo "!
\t\t</div>
\t";
} elseif ( !twig_get_attribute($this->env, $this->source, // line 56
($context["availableVariants"] ?? null), (isset($context["selectedVariant"]) || array_key_exists("selectedVariant", $context) ? $context["selectedVariant"] : (function () { throw new RuntimeError('Variable "selectedVariant" does not exist.', 56, $this->source); })()), [], "any", true, true, true, 56)) {
// line 57
echo "\t\t";
if (((isset($context["selectedVariant"]) || array_key_exists("selectedVariant", $context) ? $context["selectedVariant"] : (function () { throw new RuntimeError('Variable "selectedVariant" does not exist.', 57, $this->source); })()) != (isset($context["defaultVariant"]) || array_key_exists("defaultVariant", $context) ? $context["defaultVariant"] : (function () { throw new RuntimeError('Variable "defaultVariant" does not exist.', 57, $this->source); })()))) {
// line 58
echo "\t\t\t";
if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 58, $this->source); })())) {
// line 59
echo "\t\t\t\t<div class=\"basisbundle_edit_line basisbundle_edit_error\">
\t\t\t\t\tSelected variant \"<em>";
// line 60
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["selectedVariant"]) || array_key_exists("selectedVariant", $context) ? $context["selectedVariant"] : (function () { throw new RuntimeError('Variable "selectedVariant" does not exist.', 60, $this->source); })()), 60, $this->source), "html", null, true);
echo "</em>\" does not exist, using: \"<em>";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["defaultVariant"]) || array_key_exists("defaultVariant", $context) ? $context["defaultVariant"] : (function () { throw new RuntimeError('Variable "defaultVariant" does not exist.', 60, $this->source); })()), 60, $this->source), "html", null, true);
echo "</em>\"!
\t\t\t\t</div>
\t\t\t";
}
// line 63
echo "\t\t\t";
$context["selectedVariant"] = (isset($context["defaultVariant"]) || array_key_exists("defaultVariant", $context) ? $context["defaultVariant"] : (function () { throw new RuntimeError('Variable "defaultVariant" does not exist.', 63, $this->source); })());
// line 64
echo "\t\t";
} else {
// line 65
echo "\t\t\t";
if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 65, $this->source); })())) {
// line 66
echo "\t\t\t\t<div class=\"basisbundle_edit_line basisbundle_edit_error\">
\t\t\t\t\tSelected variant \"<em>";
// line 67
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["selectedVariant"]) || array_key_exists("selectedVariant", $context) ? $context["selectedVariant"] : (function () { throw new RuntimeError('Variable "selectedVariant" does not exist.', 67, $this->source); })()), 67, $this->source), "html", null, true);
echo "</em>\" does not exist!
\t\t\t\t</div>
\t\t\t";
}
// line 70
echo "\t\t";
}
// line 71
echo "\t";
} elseif ( !twig_test_iterable(twig_get_attribute($this->env, $this->source, (isset($context["availableVariants"]) || array_key_exists("availableVariants", $context) ? $context["availableVariants"] : (function () { throw new RuntimeError('Variable "availableVariants" does not exist.', 71, $this->source); })()), (isset($context["selectedVariant"]) || array_key_exists("selectedVariant", $context) ? $context["selectedVariant"] : (function () { throw new RuntimeError('Variable "selectedVariant" does not exist.', 71, $this->source); })()), [], "array", false, false, true, 71))) {
// line 72
echo "\t\t";
if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 72, $this->source); })())) {
// line 73
echo "\t\t\t<div class=\"basisbundle_edit_line basisbundle_edit_error\">
\t\t\t\tSelected variant \"<em>";
// line 74
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["selectedVariant"]) || array_key_exists("selectedVariant", $context) ? $context["selectedVariant"] : (function () { throw new RuntimeError('Variable "selectedVariant" does not exist.', 74, $this->source); })()), 74, $this->source), "html", null, true);
echo "</em>\" has no valid definition:\"
\t\t\t</div>
\t\t";
}
// line 77
echo "\t";
}
// line 78
echo "\t";
if ((twig_get_attribute($this->env, $this->source, ($context["availableVariants"] ?? null), (isset($context["selectedVariant"]) || array_key_exists("selectedVariant", $context) ? $context["selectedVariant"] : (function () { throw new RuntimeError('Variable "selectedVariant" does not exist.', 78, $this->source); })()), [], "any", true, true, true, 78) && twig_test_iterable(twig_get_attribute($this->env, $this->source, (isset($context["availableVariants"]) || array_key_exists("availableVariants", $context) ? $context["availableVariants"] : (function () { throw new RuntimeError('Variable "availableVariants" does not exist.', 78, $this->source); })()), (isset($context["selectedVariant"]) || array_key_exists("selectedVariant", $context) ? $context["selectedVariant"] : (function () { throw new RuntimeError('Variable "selectedVariant" does not exist.', 78, $this->source); })()), [], "array", false, false, true, 78)))) {
// line 79
echo "\t\t";
$context["selectedTemplate"] = ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["availableVariants"] ?? null), (isset($context["selectedVariant"]) || array_key_exists("selectedVariant", $context) ? $context["selectedVariant"] : (function () { throw new RuntimeError('Variable "selectedVariant" does not exist.', 79, $this->source); })()), [], "array", false, true, true, 79), "variant_template", [], "array", true, true, true, 79)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["availableVariants"] ?? null), (isset($context["selectedVariant"]) || array_key_exists("selectedVariant", $context) ? $context["selectedVariant"] : (function () { throw new RuntimeError('Variable "selectedVariant" does not exist.', 79, $this->source); })()), [], "array", false, true, true, 79), "variant_template", [], "array", false, false, true, 79), 79, $this->source), $this->sandbox->ensureToStringAllowed((isset($context["selectedVariant"]) || array_key_exists("selectedVariant", $context) ? $context["selectedVariant"] : (function () { throw new RuntimeError('Variable "selectedVariant" does not exist.', 79, $this->source); })()), 79, $this->source))) : ((isset($context["selectedVariant"]) || array_key_exists("selectedVariant", $context) ? $context["selectedVariant"] : (function () { throw new RuntimeError('Variable "selectedVariant" does not exist.', 79, $this->source); })())));
// line 80
echo "\t\t";
$context["isAppTemplate"] = ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["availableVariants"] ?? null), (isset($context["selectedVariant"]) || array_key_exists("selectedVariant", $context) ? $context["selectedVariant"] : (function () { throw new RuntimeError('Variable "selectedVariant" does not exist.', 80, $this->source); })()), [], "array", false, true, true, 80), "variant_template_from_app", [], "array", true, true, true, 80)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["availableVariants"] ?? null), (isset($context["selectedVariant"]) || array_key_exists("selectedVariant", $context) ? $context["selectedVariant"] : (function () { throw new RuntimeError('Variable "selectedVariant" does not exist.', 80, $this->source); })()), [], "array", false, true, true, 80), "variant_template_from_app", [], "array", false, false, true, 80), 80, $this->source), false)) : (false));
// line 81
echo "
";
// line 82
if ((is_string($__internal_compile_0 = (isset($context["parentTemplate"]) || array_key_exists("parentTemplate", $context) ? $context["parentTemplate"] : (function () { throw new RuntimeError('Variable "parentTemplate" does not exist.', 82, $this->source); })())) && is_string($__internal_compile_1 = "@") && ('' === $__internal_compile_1 || 0 === strpos($__internal_compile_0, $__internal_compile_1)))) {
// line 83
echo " ";
$context["parentTemplateNamespace"] = twig_get_attribute($this->env, $this->source, twig_split_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["parentTemplate"]) || array_key_exists("parentTemplate", $context) ? $context["parentTemplate"] : (function () { throw new RuntimeError('Variable "parentTemplate" does not exist.', 83, $this->source); })()), 83, $this->source), "/"), 0, [], "array", false, false, true, 83);
// line 84
echo " ";
$context["parentTemplatePath"] = twig_join_filter(twig_slice($this->env, twig_split_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["parentTemplate"]) || array_key_exists("parentTemplate", $context) ? $context["parentTemplate"] : (function () { throw new RuntimeError('Variable "parentTemplate" does not exist.', 84, $this->source); })()), 84, $this->source), "/"), 1, -1), "/");
// line 85
echo " ";
} elseif (twig_in_filter("Bundle:", (isset($context["parentTemplate"]) || array_key_exists("parentTemplate", $context) ? $context["parentTemplate"] : (function () { throw new RuntimeError('Variable "parentTemplate" does not exist.', 85, $this->source); })()))) {
// line 86
echo " ";
$context["parentTemplateNamespace"] = ("@" . $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_split_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["parentTemplate"]) || array_key_exists("parentTemplate", $context) ? $context["parentTemplate"] : (function () { throw new RuntimeError('Variable "parentTemplate" does not exist.', 86, $this->source); })()), 86, $this->source), "Bundle:"), 0, [], "array", false, false, true, 86), 86, $this->source));
// line 87
echo " ";
$context["parentTemplatePath"] = twig_get_attribute($this->env, $this->source, twig_split_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["parentTemplate"]) || array_key_exists("parentTemplate", $context) ? $context["parentTemplate"] : (function () { throw new RuntimeError('Variable "parentTemplate" does not exist.', 87, $this->source); })()), 87, $this->source), "Bundle:"), 1, [], "array", false, false, true, 87);
// line 88
echo " ";
if (twig_in_filter(":", (isset($context["parentTemplatePath"]) || array_key_exists("parentTemplatePath", $context) ? $context["parentTemplatePath"] : (function () { throw new RuntimeError('Variable "parentTemplatePath" does not exist.', 88, $this->source); })()))) {
// line 89
echo " ";
$context["parentTemplatePath"] = twig_get_attribute($this->env, $this->source, twig_split_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["parentTemplatePath"]) || array_key_exists("parentTemplatePath", $context) ? $context["parentTemplatePath"] : (function () { throw new RuntimeError('Variable "parentTemplatePath" does not exist.', 89, $this->source); })()), 89, $this->source), ":"), 0, [], "array", false, false, true, 89);
// line 90
echo " ";
} else {
// line 91
echo " ";
$context["parentTemplatePath"] = twig_join_filter(twig_slice($this->env, twig_split_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["parentTemplatePath"]) || array_key_exists("parentTemplatePath", $context) ? $context["parentTemplatePath"] : (function () { throw new RuntimeError('Variable "parentTemplatePath" does not exist.', 91, $this->source); })()), 91, $this->source), "/"), 0, -1), "/");
// line 92
echo " ";
}
// line 93
echo " ";
} else {
// line 94
echo " ";
// line 95
echo " ";
}
// line 96
echo " ";
if ((isset($context["isAppTemplate"]) || array_key_exists("isAppTemplate", $context) ? $context["isAppTemplate"] : (function () { throw new RuntimeError('Variable "isAppTemplate" does not exist.', 96, $this->source); })())) {
// line 97
echo " ";
$context["parentTemplateNamespace"] = "@App";
// line 98
echo " ";
}
// line 99
echo " ";
$context["areaBase"] = ((($this->sandbox->ensureToStringAllowed((isset($context["parentTemplateNamespace"]) || array_key_exists("parentTemplateNamespace", $context) ? $context["parentTemplateNamespace"] : (function () { throw new RuntimeError('Variable "parentTemplateNamespace" does not exist.', 99, $this->source); })()), 99, $this->source) . "/") . $this->sandbox->ensureToStringAllowed((isset($context["parentTemplatePath"]) || array_key_exists("parentTemplatePath", $context) ? $context["parentTemplatePath"] : (function () { throw new RuntimeError('Variable "parentTemplatePath" does not exist.', 99, $this->source); })()), 99, $this->source)) . "/");
// line 100
echo "\t\t";
// line 107
echo "
\t\t";
// line 108
$context["variantConfig"] = twig_get_attribute($this->env, $this->source, (isset($context["availableVariants"]) || array_key_exists("availableVariants", $context) ? $context["availableVariants"] : (function () { throw new RuntimeError('Variable "availableVariants" does not exist.', 108, $this->source); })()), (isset($context["selectedVariant"]) || array_key_exists("selectedVariant", $context) ? $context["selectedVariant"] : (function () { throw new RuntimeError('Variable "selectedVariant" does not exist.', 108, $this->source); })()), [], "array", false, false, true, 108);
// line 109
echo "
";
// line 110
if ((((twig_get_attribute($this->env, $this->source, ($context["variantConfig"] ?? null), "disabled", [], "any", true, true, true, 110)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["variantConfig"] ?? null), "disabled", [], "any", false, false, true, 110), null)) : (null)) && (isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 110, $this->source); })()))) {
// line 111
echo " <div class=\"basisbundle_edit_line basisbundle_edit_info\">
<tt>";
// line 112
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["parentTemplate"]) || array_key_exists("parentTemplate", $context) ? $context["parentTemplate"] : (function () { throw new RuntimeError('Variable "parentTemplate" does not exist.', 112, $this->source); })()), 112, $this->source), "html", null, true);
echo "</tt> / <tt>";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["selectedVariant"]) || array_key_exists("selectedVariant", $context) ? $context["selectedVariant"] : (function () { throw new RuntimeError('Variable "selectedVariant" does not exist.', 112, $this->source); })()), 112, $this->source), "html", null, true);
echo "</tt>
<p><b>Warning: Selected Variant is disabled</b> (";
// line 113
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["variantConfig"]) || array_key_exists("variantConfig", $context) ? $context["variantConfig"] : (function () { throw new RuntimeError('Variable "variantConfig" does not exist.', 113, $this->source); })()), "disabled", [], "any", false, false, true, 113), 113, $this->source), "html", null, true);
echo ")</p>
</div>
";
}
// line 116
echo "
\t\t";
// line 117
if ( !twig_get_attribute($this->env, $this->source, ($context["variantConfig"] ?? null), "linkmodul", [], "any", true, true, true, 117)) {
// line 118
echo "\t\t\t";
// line 119
echo "\t\t\t";
$context["variantConfig"] = twig_array_merge($this->sandbox->ensureToStringAllowed((isset($context["variantConfig"]) || array_key_exists("variantConfig", $context) ? $context["variantConfig"] : (function () { throw new RuntimeError('Variable "variantConfig" does not exist.', 119, $this->source); })()), 119, $this->source), ["linkmodul" => twig_get_attribute($this->env, $this->source, (isset($context["config"]) || array_key_exists("config", $context) ? $context["config"] : (function () { throw new RuntimeError('Variable "config" does not exist.', 119, $this->source); })()), "linkmodul", [], "any", false, false, true, 119)]);
// line 120
echo "\t\t";
}
// line 121
echo "\t\t";
if ( !twig_get_attribute($this->env, $this->source, ($context["variantConfig"] ?? null), "image_module", [], "any", true, true, true, 121)) {
// line 122
echo "\t\t\t";
// line 123
echo "\t\t\t";
$context["variantConfig"] = twig_array_merge($this->sandbox->ensureToStringAllowed((isset($context["variantConfig"]) || array_key_exists("variantConfig", $context) ? $context["variantConfig"] : (function () { throw new RuntimeError('Variable "variantConfig" does not exist.', 123, $this->source); })()), 123, $this->source), ["image_module" => twig_get_attribute($this->env, $this->source, (isset($context["config"]) || array_key_exists("config", $context) ? $context["config"] : (function () { throw new RuntimeError('Variable "config" does not exist.', 123, $this->source); })()), "image_module", [], "any", false, false, true, 123)]);
// line 124
echo "\t\t";
}
// line 125
echo "\t\t";
$context["overwriteKeys"] = ["headlines", "lead", "wysiwyg"];
// line 126
echo "\t\t";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["overwriteKeys"]) || array_key_exists("overwriteKeys", $context) ? $context["overwriteKeys"] : (function () { throw new RuntimeError('Variable "overwriteKeys" does not exist.', 126, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["overwriteKey"]) {
// line 127
echo "\t\t\t";
if (twig_get_attribute($this->env, $this->source, ($context["context"] ?? null), $context["overwriteKey"], [], "array", true, true, true, 127)) {
// line 128
echo "\t\t\t\t";
$context["variantConfig"] = twig_array_merge($this->sandbox->ensureToStringAllowed((isset($context["variantConfig"]) || array_key_exists("variantConfig", $context) ? $context["variantConfig"] : (function () { throw new RuntimeError('Variable "variantConfig" does not exist.', 128, $this->source); })()), 128, $this->source), [$context["overwriteKey"] => 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.', 128, $this->source); })()), $context["overwriteKey"], [], "array", false, false, true, 128)]);
// line 129
echo "\t\t\t";
}
// line 130
echo "\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['overwriteKey'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 131
echo "\t\t";
$context["mergeKeys"] = ["image_module"];
// line 132
echo "\t\t";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["mergeKeys"]) || array_key_exists("mergeKeys", $context) ? $context["mergeKeys"] : (function () { throw new RuntimeError('Variable "mergeKeys" does not exist.', 132, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["mergeKey"]) {
// line 133
echo "\t\t\t";
if (twig_get_attribute($this->env, $this->source, ($context["context"] ?? null), $context["mergeKey"], [], "array", true, true, true, 133)) {
// line 134
echo "\t\t\t\t";
$context["variantConfig"] = twig_array_merge($this->sandbox->ensureToStringAllowed((isset($context["variantConfig"]) || array_key_exists("variantConfig", $context) ? $context["variantConfig"] : (function () { throw new RuntimeError('Variable "variantConfig" does not exist.', 134, $this->source); })()), 134, $this->source), [$context["mergeKey"] => twig_array_merge($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["variantConfig"]) || array_key_exists("variantConfig", $context) ? $context["variantConfig"] : (function () { throw new RuntimeError('Variable "variantConfig" does not exist.', 134, $this->source); })()), $context["mergeKey"], [], "array", false, false, true, 134), 134, $this->source), $this->sandbox->ensureToStringAllowed(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.', 134, $this->source); })()), $context["mergeKey"], [], "array", false, false, true, 134), 134, $this->source))]);
// line 135
echo "\t\t\t";
}
// line 136
echo "\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['mergeKey'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 137
echo "
\t\t";
// line 138
$context["wrapper"] = null;
// line 139
echo "\t\t";
if (((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 139, $this->source); })()) && twig_get_attribute($this->env, $this->source, ($context["variantConfig"] ?? null), "editmode_wrapper", [], "any", true, true, true, 139))) {
// line 140
echo "\t\t\t";
$context["wrapper"] = twig_get_attribute($this->env, $this->source, (isset($context["variantConfig"]) || array_key_exists("variantConfig", $context) ? $context["variantConfig"] : (function () { throw new RuntimeError('Variable "variantConfig" does not exist.', 140, $this->source); })()), "editmode_wrapper", [], "any", false, false, true, 140);
// line 141
echo "\t\t";
} elseif (( !(isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 141, $this->source); })()) && twig_get_attribute($this->env, $this->source, ($context["variantConfig"] ?? null), "frontend_wrapper", [], "any", true, true, true, 141))) {
// line 142
echo "\t\t\t";
$context["wrapper"] = twig_get_attribute($this->env, $this->source, (isset($context["variantConfig"]) || array_key_exists("variantConfig", $context) ? $context["variantConfig"] : (function () { throw new RuntimeError('Variable "variantConfig" does not exist.', 142, $this->source); })()), "frontend_wrapper", [], "any", false, false, true, 142);
// line 143
echo "\t\t";
} elseif (twig_get_attribute($this->env, $this->source, ($context["variantConfig"] ?? null), "wrapper", [], "any", true, true, true, 143)) {
// line 144
echo "\t\t\t";
$context["wrapper"] = twig_get_attribute($this->env, $this->source, (isset($context["variantConfig"]) || array_key_exists("variantConfig", $context) ? $context["variantConfig"] : (function () { throw new RuntimeError('Variable "variantConfig" does not exist.', 144, $this->source); })()), "wrapper", [], "any", false, false, true, 144);
// line 145
echo "\t\t";
}
// line 146
echo "\t\t";
// line 147
echo " ";
$context["passedParams"] = ["config" => (isset($context["variantConfig"]) || array_key_exists("variantConfig", $context) ? $context["variantConfig"] : (function () { throw new RuntimeError('Variable "variantConfig" does not exist.', 147, $this->source); })())];
// line 148
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(((twig_get_attribute($this->env, $this->source, ($context["config"] ?? null), "pass_params", [], "any", true, true, true, 148)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["config"] ?? null), "pass_params", [], "any", false, false, true, 148), null)) : (null)));
foreach ($context['_seq'] as $context["_key"] => $context["passKey"]) {
// line 149
echo " ";
if (twig_in_filter($context["passKey"], twig_get_array_keys_filter(twig_get_attribute($this->env, $this->source, $context, "context", [], "any", false, false, true, 149)))) {
// line 150
echo " ";
$context["passedParams"] = twig_array_merge($this->sandbox->ensureToStringAllowed((isset($context["passedParams"]) || array_key_exists("passedParams", $context) ? $context["passedParams"] : (function () { throw new RuntimeError('Variable "passedParams" does not exist.', 150, $this->source); })()), 150, $this->source), [$context["passKey"] => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context, "context", [], "any", false, false, true, 150), $context["passKey"], [], "array", false, false, true, 150)]);
// line 151
echo " ";
}
// line 152
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['passKey'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 153
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(((twig_get_attribute($this->env, $this->source, ($context["variantConfig"] ?? null), "pass_params", [], "any", true, true, true, 153)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["variantConfig"] ?? null), "pass_params", [], "any", false, false, true, 153), null)) : (null)));
foreach ($context['_seq'] as $context["_key"] => $context["passKey"]) {
// line 154
echo " ";
if (twig_in_filter($context["passKey"], twig_get_array_keys_filter(twig_get_attribute($this->env, $this->source, $context, "context", [], "any", false, false, true, 154)))) {
// line 155
echo " ";
$context["passedParams"] = twig_array_merge($this->sandbox->ensureToStringAllowed((isset($context["passedParams"]) || array_key_exists("passedParams", $context) ? $context["passedParams"] : (function () { throw new RuntimeError('Variable "passedParams" does not exist.', 155, $this->source); })()), 155, $this->source), [$context["passKey"] => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context, "context", [], "any", false, false, true, 155), $context["passKey"], [], "array", false, false, true, 155)]);
// line 156
echo " ";
}
// line 157
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['passKey'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 158
echo "\t\t";
if ((isset($context["wrapper"]) || array_key_exists("wrapper", $context) ? $context["wrapper"] : (function () { throw new RuntimeError('Variable "wrapper" does not exist.', 158, $this->source); })())) {
// line 159
echo "\t\t\t";
// line 160
echo "\t\t\t";
$macros["wrap_macro"] = $this->loadTemplate("@FoxHabbitBasis/Macro/wrap.html.twig", "@FoxHabbitBasis/Macro/area-variant.html.twig", 160)->unwrap();
// line 161
echo "\t\t\t";
echo twig_call_macro($macros["wrap_macro"], "macro_wrapperOpen", [(isset($context["wrapper"]) || array_key_exists("wrapper", $context) ? $context["wrapper"] : (function () { throw new RuntimeError('Variable "wrapper" does not exist.', 161, $this->source); })()), $context, (isset($context["outerClass"]) || array_key_exists("outerClass", $context) ? $context["outerClass"] : (function () { throw new RuntimeError('Variable "outerClass" does not exist.', 161, $this->source); })()), (isset($context["outerAttributes"]) || array_key_exists("outerAttributes", $context) ? $context["outerAttributes"] : (function () { throw new RuntimeError('Variable "outerAttributes" does not exist.', 161, $this->source); })())], 161, $context, $this->getSourceContext());
echo "
\t\t\t\t";
// line 162
$this->loadTemplate(((((isset($context["areaBase"]) || array_key_exists("areaBase", $context) ? $context["areaBase"] : (function () { throw new RuntimeError('Variable "areaBase" does not exist.', 162, $this->source); })()) . "variant-") . (isset($context["selectedTemplate"]) || array_key_exists("selectedTemplate", $context) ? $context["selectedTemplate"] : (function () { throw new RuntimeError('Variable "selectedTemplate" does not exist.', 162, $this->source); })())) . ".html.twig"), "@FoxHabbitBasis/Macro/area-variant.html.twig", 162)->display(twig_array_merge($context, (isset($context["passedParams"]) || array_key_exists("passedParams", $context) ? $context["passedParams"] : (function () { throw new RuntimeError('Variable "passedParams" does not exist.', 162, $this->source); })())));
// line 163
echo "\t\t\t";
echo twig_call_macro($macros["wrap_macro"], "macro_wrapperClose", [(isset($context["wrapper"]) || array_key_exists("wrapper", $context) ? $context["wrapper"] : (function () { throw new RuntimeError('Variable "wrapper" does not exist.', 163, $this->source); })())], 163, $context, $this->getSourceContext());
echo "
\t\t";
} else {
// line 165
echo "\t\t\t";
// line 166
echo "\t\t\t";
$this->loadTemplate(((((isset($context["areaBase"]) || array_key_exists("areaBase", $context) ? $context["areaBase"] : (function () { throw new RuntimeError('Variable "areaBase" does not exist.', 166, $this->source); })()) . "variant-") . (isset($context["selectedTemplate"]) || array_key_exists("selectedTemplate", $context) ? $context["selectedTemplate"] : (function () { throw new RuntimeError('Variable "selectedTemplate" does not exist.', 166, $this->source); })())) . ".html.twig"), "@FoxHabbitBasis/Macro/area-variant.html.twig", 166)->display(twig_array_merge($context, (isset($context["passedParams"]) || array_key_exists("passedParams", $context) ? $context["passedParams"] : (function () { throw new RuntimeError('Variable "passedParams" does not exist.', 166, $this->source); })())));
// line 167
echo "\t\t";
}
// line 168
echo "\t\t";
// line 169
echo "\t";
}
$__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/area-variant.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 556 => 169, 554 => 168, 551 => 167, 548 => 166, 546 => 165, 540 => 163, 538 => 162, 533 => 161, 530 => 160, 528 => 159, 525 => 158, 519 => 157, 516 => 156, 513 => 155, 510 => 154, 505 => 153, 499 => 152, 496 => 151, 493 => 150, 490 => 149, 485 => 148, 482 => 147, 480 => 146, 477 => 145, 474 => 144, 471 => 143, 468 => 142, 465 => 141, 462 => 140, 459 => 139, 457 => 138, 454 => 137, 448 => 136, 445 => 135, 442 => 134, 439 => 133, 434 => 132, 431 => 131, 425 => 130, 422 => 129, 419 => 128, 416 => 127, 411 => 126, 408 => 125, 405 => 124, 402 => 123, 400 => 122, 397 => 121, 394 => 120, 391 => 119, 389 => 118, 387 => 117, 384 => 116, 378 => 113, 372 => 112, 369 => 111, 367 => 110, 364 => 109, 362 => 108, 359 => 107, 357 => 100, 354 => 99, 351 => 98, 348 => 97, 345 => 96, 342 => 95, 340 => 94, 337 => 93, 334 => 92, 331 => 91, 328 => 90, 325 => 89, 322 => 88, 319 => 87, 316 => 86, 313 => 85, 310 => 84, 307 => 83, 305 => 82, 302 => 81, 299 => 80, 296 => 79, 293 => 78, 290 => 77, 284 => 74, 281 => 73, 278 => 72, 275 => 71, 272 => 70, 266 => 67, 263 => 66, 260 => 65, 257 => 64, 254 => 63, 246 => 60, 243 => 59, 240 => 58, 237 => 57, 235 => 56, 230 => 54, 227 => 53, 224 => 52, 221 => 51, 214 => 47, 210 => 46, 206 => 44, 203 => 43, 200 => 42, 197 => 41, 194 => 40, 191 => 39, 188 => 38, 185 => 37, 182 => 36, 176 => 35, 173 => 34, 170 => 33, 167 => 32, 162 => 31, 160 => 30, 157 => 29, 151 => 28, 148 => 27, 145 => 26, 142 => 25, 139 => 24, 136 => 23, 133 => 22, 130 => 21, 127 => 20, 124 => 19, 119 => 18, 116 => 17, 114 => 16, 111 => 15, 105 => 12, 101 => 11, 98 => 10, 96 => 9, 93 => 8, 90 => 7, 87 => 6, 84 => 5, 81 => 4, 78 => 3, 75 => 2, 53 => 1,);
}
public function getSourceContext()
{
return new Source("{% macro includeVariant( context, parentTemplate, outerClass, outerAttributes) %}
\t{% set editmode = context.editmode %}
\t{% set document = context.document %}
\t{% set config = context.config %}
\t{% if context.brick is defined %}
\t\t{% set brick = context.brick %}
{% endif %}
{% if config.disabled|default(null) and editmode %}
<div class=\"basisbundle_edit_line basisbundle_edit_info\">
<tt>{{ parentTemplate }}</tt>
<p><b>Warning: Areabrick is disabled</b> ({{ config.disabled }})</p>
</div>
{% endif %}
\t{% set variantStore = [] %}
\t{% set availableVariants = config.variants|default([]) %}
\t{% for id,variant in availableVariants %}
\t\t{% if variant is iterable and variant.variant_name is defined %}
\t\t\t{% set varianteSelectable = true %}
\t\t\t{% if variant.variant_disable_user_select|default(false) %}
\t\t\t\t{% set varianteSelectable = false %}
\t\t\t{% endif %}
\t\t\t{% if varianteSelectable %}
\t\t\t\t{% set variantStore = variantStore|merge([[id,variant.variant_name]]) %}
\t\t\t{% endif %}
\t\t{% endif %}
\t{% endfor %}
\t{% if context.variant|default(false) %}
\t\t{# when a fixed variant is set, reduce the set of available variants #}
\t\t{% for id,variant in availableVariants %}
{% if id == context.variant %}
\t\t\t {% set variantStore = [[id,variant.variant_name]] %}
{% endif %}
\t\t{% endfor %}
\t{% endif %}
\t{% set defaultVariant = context.variant|default( config.variant_default|default('default')) %}
\t{% set selectedVariant = context.variant|default( pimcore_select('variant').getValue()|default(defaultVariant)) %}
\t{% if editmode %}
\t\t{% if pimcore_select('variant').isEmpty() or (pimcore_select('variant').getValue() != selectedVariant) %}
\t\t\t{% do pimcore_select(\"variant\").setDataFromResource(defaultVariant) %}
\t\t{% endif %}
\t\t{% if variantStore|length > 1 %}
\t\t\t<div class=\"basisbundle_edit_line\">
\t\t\t\t<div class=\"basisbundle_edit_entry\">
\t\t\t\t\t<div class=\"basisbundle_edit_label\">{{ config.variant_label|default('Choose variant') }}:</div>
\t\t\t\t\t<div class=\"basisbundle_edit_input\">{{ pimcore_select('variant',{store:variantStore,reload:true,class:'m-0'}) }}</div>
\t\t\t\t</div>
\t\t\t</div>
\t\t{% endif %}
\t{% endif %}
\t{% if not availableVariants %}
\t\t<div class=\"basisbundle_edit_line basisbundle_edit_error\">
\t\t\tNo variants available for {{ parentTemplate }}!
\t\t</div>
\t{% elseif not attribute( availableVariants, selectedVariant) is defined %}
\t\t{% if selectedVariant != defaultVariant %}
\t\t\t{% if editmode %}
\t\t\t\t<div class=\"basisbundle_edit_line basisbundle_edit_error\">
\t\t\t\t\tSelected variant \"<em>{{selectedVariant}}</em>\" does not exist, using: \"<em>{{defaultVariant}}</em>\"!
\t\t\t\t</div>
\t\t\t{% endif %}
\t\t\t{% set selectedVariant = defaultVariant %}
\t\t{% else %}
\t\t\t{% if editmode %}
\t\t\t\t<div class=\"basisbundle_edit_line basisbundle_edit_error\">
\t\t\t\t\tSelected variant \"<em>{{selectedVariant}}</em>\" does not exist!
\t\t\t\t</div>
\t\t\t{% endif %}
\t\t{% endif %}
\t{% elseif not availableVariants[selectedVariant] is iterable %}
\t\t{% if editmode %}
\t\t\t<div class=\"basisbundle_edit_line basisbundle_edit_error\">
\t\t\t\tSelected variant \"<em>{{selectedVariant}}</em>\" has no valid definition:\"
\t\t\t</div>
\t\t{% endif %}
\t{% endif %}
\t{% if attribute( availableVariants, selectedVariant) is defined and availableVariants[selectedVariant] is iterable %}
\t\t{% set selectedTemplate = availableVariants[selectedVariant]['variant_template']|default(selectedVariant) %}
\t\t{% set isAppTemplate = availableVariants[selectedVariant]['variant_template_from_app']|default(false) %}
{% if parentTemplate starts with '@' %}
{% set parentTemplateNamespace = parentTemplate|split('/')[0] %}
{% set parentTemplatePath = parentTemplate|split('/')|slice(1,-1)|join('/') %}
{% elseif 'Bundle:' in parentTemplate %}
{% set parentTemplateNamespace = '@' ~ parentTemplate|split('Bundle:')[0] %}
{% set parentTemplatePath = parentTemplate|split('Bundle:')[1] %}
{% if ':' in parentTemplatePath %}
{% set parentTemplatePath = parentTemplatePath|split(':')[0] %}
{% else %}
{% set parentTemplatePath = parentTemplatePath|split('/')|slice(0,-1)|join('/') %}
{% endif %}
{% else %}
{# ??? #}
{% endif %}
{% if isAppTemplate %}
{% set parentTemplateNamespace = '@App' %}
{% endif %}
{% set areaBase = parentTemplateNamespace ~ '/' ~ parentTemplatePath ~ '/' %}
\t\t{#
<!-- parentTemplate: \"{{ parentTemplate }}\" -->
\t\t<!-- parentTemplateNamespace: \"{{ parentTemplateNamespace }}\" -->
\t\t<!-- parentTemplatePath: \"{{ parentTemplatePath }}\" -->
\t\t<!-- isAppTemplate: \"{{ isAppTemplate }}\" -->
\t\t<!-- areaBase: \"{{ areaBase }}\" -->
#}
\t\t{% set variantConfig = availableVariants[selectedVariant] %}
{% if variantConfig.disabled|default(null) and editmode %}
<div class=\"basisbundle_edit_line basisbundle_edit_info\">
<tt>{{ parentTemplate }}</tt> / <tt>{{ selectedVariant }}</tt>
<p><b>Warning: Selected Variant is disabled</b> ({{ variantConfig.disabled }})</p>
</div>
{% endif %}
\t\t{% if not variantConfig.linkmodul is defined %}
\t\t\t{# linkmodul nicht in variante definiert => setzen #}
\t\t\t{% set variantConfig = variantConfig|merge({linkmodul:config.linkmodul}) %}
\t\t{% endif %}
\t\t{% if not variantConfig.image_module is defined %}
\t\t\t{# image_module nicht in variante definiert => setzen #}
\t\t\t{% set variantConfig = variantConfig|merge({image_module:config.image_module}) %}
\t\t{% endif %}
\t\t{% set overwriteKeys = ['headlines','lead','wysiwyg'] %}
\t\t{% for overwriteKey in overwriteKeys %}
\t\t\t{% if context[overwriteKey] is defined %}
\t\t\t\t{% set variantConfig = variantConfig|merge({(overwriteKey):context[overwriteKey]}) %}
\t\t\t{% endif %}
\t\t{% endfor %}
\t\t{% set mergeKeys = ['image_module'] %}
\t\t{% for mergeKey in mergeKeys %}
\t\t\t{% if context[mergeKey] is defined %}
\t\t\t\t{% set variantConfig = variantConfig|merge({(mergeKey):variantConfig[mergeKey]|merge(context[mergeKey])}) %}
\t\t\t{% endif %}
\t\t{% endfor %}
\t\t{% set wrapper = null %}
\t\t{% if editmode and variantConfig.editmode_wrapper is defined %}
\t\t\t{% set wrapper = variantConfig.editmode_wrapper %}
\t\t{% elseif not editmode and variantConfig.frontend_wrapper is defined %}
\t\t\t{% set wrapper = variantConfig.frontend_wrapper %}
\t\t{% elseif variantConfig.wrapper is defined %}
\t\t\t{% set wrapper = variantConfig.wrapper %}
\t\t{% endif %}
\t\t{# <!--- start config \"{{ selectedVariant }}\" variant-{{ selectedTemplate }} --> #}
{% set passedParams = { config: variantConfig} %}
{% for passKey in config.pass_params|default(null) %}
{% if passKey in _context.context|keys %}
{% set passedParams = passedParams|merge({ (passKey): _context.context[passKey]}) %}
{% endif %}
{% endfor %}
{% for passKey in variantConfig.pass_params|default(null) %}
{% if passKey in _context.context|keys %}
{% set passedParams = passedParams|merge({ (passKey): _context.context[passKey]}) %}
{% endif %}
{% endfor %}
\t\t{% if wrapper %}
\t\t\t{# a wrapper is defined #}
\t\t\t{% import '@FoxHabbitBasis/Macro/wrap.html.twig' as wrap_macro %}
\t\t\t{{ wrap_macro.wrapperOpen( wrapper, _context, outerClass, outerAttributes) }}
\t\t\t\t{% include areaBase ~ 'variant-' ~ selectedTemplate ~ '.html.twig' with passedParams %}
\t\t\t{{ wrap_macro.wrapperClose( wrapper) }}
\t\t{% else %}
\t\t\t{# no wrapper => include directly #}
\t\t\t{% include areaBase ~ 'variant-' ~ selectedTemplate ~ '.html.twig' with passedParams %}
\t\t{% endif %}
\t\t{# <!--- end variant-{{ selectedTemplate }} --> #}
\t{% endif %}
{% endmacro %}
", "@FoxHabbitBasis/Macro/area-variant.html.twig", "/srv/httpd/vhosts/lorch-test/releases/51/bundles/FoxHabbit/BasisBundle/Resources/views/Macro/area-variant.html.twig");
}
public function checkSecurity()
{
static $tags = array("macro" => 1, "set" => 2, "if" => 5, "for" => 18, "do" => 41, "import" => 160, "include" => 162);
static $filters = array("default" => 9, "escape" => 11, "merge" => 25, "length" => 43, "split" => 83, "join" => 84, "slice" => 84, "keys" => 149);
static $functions = array("pimcore_select" => 38);
try {
$this->sandbox->checkSecurity(
['macro', 'set', 'if', 'for', 'do', 'import', 'include'],
['default', 'escape', 'merge', 'length', 'split', 'join', 'slice', 'keys'],
['pimcore_select']
);
} 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;
}
}
}