<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
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;
use Twig\TemplateWrapper;
/* areas/content-brick/layouts/text-image.html.twig */
class __TwigTemplate_6a6dc96c2ea8c65cb387b1377f8db9782be9b2ebf986321977d052caf3adfbd4 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
$this->sandbox = $this->extensions[SandboxExtension::class];
$this->checkSecurity();
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "areas/content-brick/layouts/text-image.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "areas/content-brick/layouts/text-image.html.twig"));
// line 1
yield "
";
// line 2
$context["hasImage"] = (((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 2, $this->source); })()) || ($context["overrideImage"] ?? null)) || !CoreExtension::getAttribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "image", "image"), "isEmpty", [], "method", false, false, true, 2));
// line 3
yield "
";
// line 4
$context["showReadmoreMobile"] = CoreExtension::getAttribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "checkbox", "showReadmoreMobile"), "getData", [], "method", false, false, true, 4);
// line 5
$context["showReadmore"] = CoreExtension::getAttribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "checkbox", "showReadmore"), "getData", [], "method", false, false, true, 5);
// line 6
yield "
";
// line 7
$context["hideMediaOnMobile"] = CoreExtension::getAttribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "checkbox", "hideMediaOnMobile"), "getData", [], "method", false, false, true, 7);
// line 8
yield "
";
// line 9
$context["showRentalFormButton"] = CoreExtension::getAttribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "checkbox", "showRentalFormButton"), "getData", [], "method", false, false, true, 9);
// line 10
$context["showRentalFormButtonColor"] = CoreExtension::getAttribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "showRentalFormButtonColor"), "getData", [], "method", false, false, true, 10);
// line 11
yield "
";
// line 12
$context["showCustomButtonComment"] = CoreExtension::getAttribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "checkbox", "showCustomButtonComment"), "getData", [], "method", false, false, true, 12);
// line 13
$context["customButtonComment"] = CoreExtension::getAttribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "input", "customButtonComment"), "getData", [], "method", false, false, true, 13);
// line 14
yield "
<div class=\"container grid justify-center grid-cols-1 gap-6 mx-auto text-base md:text-lg md:grid-cols-2\">
<div class=\"
md:flex md:items-center
";
// line 18
if ((isset($context["hasImage"]) || array_key_exists("hasImage", $context) ? $context["hasImage"] : (function () { throw new RuntimeError('Variable "hasImage" does not exist.', 18, $this->source); })())) {
// line 19
yield " ";
yield ((CoreExtension::getAttribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "inverted"), "data", [], "any", false, false, true, 19)) ? ("md:order-2 lg:pl-16") : ("md:order-1 lg:pr-16"));
yield "
";
} else {
// line 21
yield " col-span-1 md:col-span-2
";
}
// line 23
yield " ";
yield (((isset($context["hideMediaOnMobile"]) || array_key_exists("hideMediaOnMobile", $context) ? $context["hideMediaOnMobile"] : (function () { throw new RuntimeError('Variable "hideMediaOnMobile" does not exist.', 23, $this->source); })())) ? ("pt-4 md:pt-0") : (""));
yield "
\"
x-data=\"{ contentOpen: false }\"
>
<div>
";
// line 28
yield from $this->loadTemplate("areas/content-brick/partials/_headline.html.twig", "areas/content-brick/layouts/text-image.html.twig", 28)->unwrap()->yield($context);
// line 29
yield "
";
// line 30
yield from $this->loadTemplate("areas/content-brick/partials/_title.html.twig", "areas/content-brick/layouts/text-image.html.twig", 30)->unwrap()->yield($context);
// line 31
yield "
<div
class=\"relative overflow-hidden\"
";
// line 34
if ((array_key_exists("showReadMore", $context) && (isset($context["showReadMore"]) || array_key_exists("showReadMore", $context) ? $context["showReadMore"] : (function () { throw new RuntimeError('Variable "showReadMore" does not exist.', 34, $this->source); })()))) {
// line 35
yield " :class=\"{'max-h-36 ";
yield (((isset($context["showReadmoreMobile"]) || array_key_exists("showReadmoreMobile", $context) ? $context["showReadmoreMobile"] : (function () { throw new RuntimeError('Variable "showReadmoreMobile" does not exist.', 35, $this->source); })())) ? ("md:max-h-fit") : (""));
yield "': !contentOpen }\"
";
}
// line 37
yield " >
";
// line 38
yield from $this->loadTemplate("areas/content-brick/partials/_wysiwyg.html.twig", "areas/content-brick/layouts/text-image.html.twig", 38)->unwrap()->yield($context);
// line 39
yield "
";
// line 40
if ((isset($context["showReadmore"]) || array_key_exists("showReadmore", $context) ? $context["showReadmore"] : (function () { throw new RuntimeError('Variable "showReadmore" does not exist.', 40, $this->source); })())) {
// line 41
yield " <div
class=\" flex flex-col justify-end bottom-0 w-full min-h-[100px]
";
// line 43
yield (((isset($context["showReadmoreMobile"]) || array_key_exists("showReadmoreMobile", $context) ? $context["showReadmoreMobile"] : (function () { throw new RuntimeError('Variable "showReadmoreMobile" does not exist.', 43, $this->source); })())) ? ("md:hidden") : (""));
yield "\"
:class=\"!contentOpen ? 'absolute bg-gradient-to-t from-white via-white' : ''\"
>
<button
class=\"button button__secondary group\"
@click=\"contentOpen = !contentOpen\"
>
<span x-show=\"!contentOpen\">";
// line 50
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Lees meer"), "html", null, true);
yield "</span>
<span x-show=\"contentOpen\">";
// line 51
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Lees minder"), "html", null, true);
yield "</span>
<span class=\"flex items-center justify-center w-6 h-6 ml-3 bg-white rounded-full shadow-md text-blue group-hover:bg-blue group-hover:text-white\">
<svg
x-show=\"!contentOpen\"
class=\"w-3.5 shrink-0\"
xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 14 14\"><path fill=\"currentColor\" fill-rule=\"nonzero\" d=\"M6.68 0h.024a.929.929 0 0 1 .916.915l.07 4.994 4.994.07a.93.93 0 0 1 .916.916.878.878 0 0 1-.866.89h-.024l-4.995-.07.07 4.995a.878.878 0 0 1-.89.89.93.93 0 0 1-.915-.916L5.91 7.69.914 7.62A.93.93 0 0 1 0 6.704a.878.878 0 0 1 .89-.89l4.994.07L5.814.89A.878.878 0 0 1 6.68 0Z\"/>
</svg>
<svg
x-show=\"contentOpen\"
class=\"w-3.5 shrink-0\"
xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 14 3\"><path fill=\"currentColor\" fill-rule=\"nonzero\" d=\"M12.684.979a.929.929 0 0 1 .916.916.878.878 0 0 1-.866.89h-.024L.915 2.62A.929.929 0 0 1 0 1.704a.878.878 0 0 1 .89-.89l11.794.165Z\"/>
</svg>
</span>
</button>
</div>
";
}
// line 67
yield " </div>
";
// line 69
if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 69, $this->source); })())) {
// line 70
yield " <div class=\"mt-8\">
<label class=\"block\">
";
// line 72
yield $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "checkbox", "showReadmore", ["reload" => true]);
yield "
<span>Toon 'Lees meer' button voor bovenstaande tekst.</span>
</label>
<label class=\"block\">
";
// line 76
yield $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "checkbox", "showReadmoreMobile", ["reload" => true]);
yield "
<span>Toon 'Lees meer' button alleen op mobiele devices.</span>
</label>
</div>
";
}
// line 81
yield "
";
// line 82
yield from $this->loadTemplate("areas/content-brick/partials/_usps.html.twig", "areas/content-brick/layouts/text-image.html.twig", 82)->unwrap()->yield($context);
// line 83
yield "
";
// line 84
yield from $this->loadTemplate("areas/content-brick/partials/_form-builder.html.twig", "areas/content-brick/layouts/text-image.html.twig", 84)->unwrap()->yield(CoreExtension::merge($context, ["fieldName" => "formbuilder-select_text-image"]));
// line 87
yield "
";
// line 88
yield from $this->loadTemplate("areas/content-brick/partials/_buttons.html.twig", "areas/content-brick/layouts/text-image.html.twig", 88)->unwrap()->yield(CoreExtension::merge($context, ["product" => ( // line 89
$context["product"] ?? null), "productCategory" => ( // line 90
$context["productCategory"] ?? null), "showRentalFormButton" => ( // line 91
$context["showRentalFormButton"] ?? null), "showRentalFormButtonColor" => ( // line 92
$context["showRentalFormButtonColor"] ?? null), "greenButton" => true, "showCustomButtonComment" => ( // line 94
$context["showCustomButtonComment"] ?? null), "buttonComment" => ((( // line 95
(isset($context["customButtonComment"]) || array_key_exists("customButtonComment", $context) ? $context["customButtonComment"] : (function () { throw new RuntimeError('Variable "customButtonComment" does not exist.', 95, $this->source); })()) !== "")) ? ((isset($context["customButtonComment"]) || array_key_exists("customButtonComment", $context) ? $context["customButtonComment"] : (function () { throw new RuntimeError('Variable "customButtonComment" does not exist.', 95, $this->source); })())) : ($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Binnen één dag vrijblijvend een offerte")))]));
// line 97
yield " </div>
</div>
";
// line 100
if ((isset($context["hasImage"]) || array_key_exists("hasImage", $context) ? $context["hasImage"] : (function () { throw new RuntimeError('Variable "hasImage" does not exist.', 100, $this->source); })())) {
// line 101
yield " <div class=\"md:flex md:items-center
";
// line 102
yield ((CoreExtension::getAttribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "inverted"), "data", [], "any", false, false, true, 102)) ? ("md:order-1") : ("md:order-2"));
yield "
";
// line 103
yield (((isset($context["hideMediaOnMobile"]) || array_key_exists("hideMediaOnMobile", $context) ? $context["hideMediaOnMobile"] : (function () { throw new RuntimeError('Variable "hideMediaOnMobile" does not exist.', 103, $this->source); })())) ? ("hidden md:block") : (""));
yield "
\">
";
// line 105
if (((array_key_exists("overrideImage", $context) && (isset($context["overrideImage"]) || array_key_exists("overrideImage", $context) ? $context["overrideImage"] : (function () { throw new RuntimeError('Variable "overrideImage" does not exist.', 105, $this->source); })())) && CoreExtension::getAttribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "image", "image"), "isEmpty", [], "method", false, false, true, 105))) {
// line 106
yield " ";
yield from $this->loadTemplate("areas/content-brick/partials/override-image.html.twig", "areas/content-brick/layouts/text-image.html.twig", 106)->unwrap()->yield($context);
// line 107
yield " ";
} else {
// line 108
yield " ";
yield $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "image", "image", ["class" => "block overflow-hidden rounded-md", "thumbnail" => "content", "pictureAttributes" => ["class" => "block overflow-hidden rounded-md"]]);
// line 112
yield "
";
}
// line 114
yield " </div>
";
}
// line 116
yield "</div>";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "areas/content-brick/layouts/text-image.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 259 => 116, 255 => 114, 251 => 112, 248 => 108, 245 => 107, 242 => 106, 240 => 105, 235 => 103, 231 => 102, 228 => 101, 226 => 100, 221 => 97, 219 => 95, 218 => 94, 217 => 92, 216 => 91, 215 => 90, 214 => 89, 213 => 88, 210 => 87, 208 => 84, 205 => 83, 203 => 82, 200 => 81, 192 => 76, 185 => 72, 181 => 70, 179 => 69, 175 => 67, 156 => 51, 152 => 50, 142 => 43, 138 => 41, 136 => 40, 133 => 39, 131 => 38, 128 => 37, 122 => 35, 120 => 34, 115 => 31, 113 => 30, 110 => 29, 108 => 28, 99 => 23, 95 => 21, 89 => 19, 87 => 18, 81 => 14, 79 => 13, 77 => 12, 74 => 11, 72 => 10, 70 => 9, 67 => 8, 65 => 7, 62 => 6, 60 => 5, 58 => 4, 55 => 3, 53 => 2, 50 => 1,);
}
public function getSourceContext(): Source
{
return new Source("
{% set hasImage = editmode || (overrideImage ?? null) || not pimcore_image('image').isEmpty() %}
{% set showReadmoreMobile = pimcore_checkbox(\"showReadmoreMobile\").getData() %}
{% set showReadmore = pimcore_checkbox(\"showReadmore\").getData() %}
{% set hideMediaOnMobile = pimcore_checkbox(\"hideMediaOnMobile\").getData() %}
{% set showRentalFormButton = pimcore_checkbox('showRentalFormButton').getData() %}
{% set showRentalFormButtonColor = pimcore_select('showRentalFormButtonColor').getData() %}
{% set showCustomButtonComment = pimcore_checkbox('showCustomButtonComment').getData() %}
{% set customButtonComment = pimcore_input('customButtonComment').getData() %}
<div class=\"container grid justify-center grid-cols-1 gap-6 mx-auto text-base md:text-lg md:grid-cols-2\">
<div class=\"
md:flex md:items-center
{% if hasImage %}
{{ pimcore_select('inverted').data ? 'md:order-2 lg:pl-16' : 'md:order-1 lg:pr-16' }}
{% else %}
col-span-1 md:col-span-2
{% endif %}
{{ hideMediaOnMobile ? 'pt-4 md:pt-0' : '' }}
\"
x-data=\"{ contentOpen: false }\"
>
<div>
{% include 'areas/content-brick/partials/_headline.html.twig' %}
{% include 'areas/content-brick/partials/_title.html.twig' %}
<div
class=\"relative overflow-hidden\"
{% if showReadMore is defined and showReadMore %}
:class=\"{'max-h-36 {{ showReadmoreMobile ? 'md:max-h-fit' : ''}}': !contentOpen }\"
{% endif %}
>
{% include 'areas/content-brick/partials/_wysiwyg.html.twig' %}
{% if showReadmore %}
<div
class=\" flex flex-col justify-end bottom-0 w-full min-h-[100px]
{{ showReadmoreMobile ? 'md:hidden' : ''}}\"
:class=\"!contentOpen ? 'absolute bg-gradient-to-t from-white via-white' : ''\"
>
<button
class=\"button button__secondary group\"
@click=\"contentOpen = !contentOpen\"
>
<span x-show=\"!contentOpen\">{{ 'Lees meer' | trans }}</span>
<span x-show=\"contentOpen\">{{ 'Lees minder' | trans }}</span>
<span class=\"flex items-center justify-center w-6 h-6 ml-3 bg-white rounded-full shadow-md text-blue group-hover:bg-blue group-hover:text-white\">
<svg
x-show=\"!contentOpen\"
class=\"w-3.5 shrink-0\"
xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 14 14\"><path fill=\"currentColor\" fill-rule=\"nonzero\" d=\"M6.68 0h.024a.929.929 0 0 1 .916.915l.07 4.994 4.994.07a.93.93 0 0 1 .916.916.878.878 0 0 1-.866.89h-.024l-4.995-.07.07 4.995a.878.878 0 0 1-.89.89.93.93 0 0 1-.915-.916L5.91 7.69.914 7.62A.93.93 0 0 1 0 6.704a.878.878 0 0 1 .89-.89l4.994.07L5.814.89A.878.878 0 0 1 6.68 0Z\"/>
</svg>
<svg
x-show=\"contentOpen\"
class=\"w-3.5 shrink-0\"
xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 14 3\"><path fill=\"currentColor\" fill-rule=\"nonzero\" d=\"M12.684.979a.929.929 0 0 1 .916.916.878.878 0 0 1-.866.89h-.024L.915 2.62A.929.929 0 0 1 0 1.704a.878.878 0 0 1 .89-.89l11.794.165Z\"/>
</svg>
</span>
</button>
</div>
{% endif %}
</div>
{% if editmode %}
<div class=\"mt-8\">
<label class=\"block\">
{{ pimcore_checkbox('showReadmore', { reload: true }) }}
<span>Toon 'Lees meer' button voor bovenstaande tekst.</span>
</label>
<label class=\"block\">
{{ pimcore_checkbox('showReadmoreMobile', { reload: true }) }}
<span>Toon 'Lees meer' button alleen op mobiele devices.</span>
</label>
</div>
{% endif %}
{% include 'areas/content-brick/partials/_usps.html.twig' %}
{% include 'areas/content-brick/partials/_form-builder.html.twig' with {
'fieldName' : 'formbuilder-select_text-image' }
%}
{% include 'areas/content-brick/partials/_buttons.html.twig' with {
product: product ?? null,
productCategory: productCategory ?? null,
showRentalFormButton: showRentalFormButton ?? null,
showRentalFormButtonColor: showRentalFormButtonColor ?? null,
greenButton: true,
showCustomButtonComment: showCustomButtonComment ?? null,
buttonComment: customButtonComment !== '' ? customButtonComment : 'Binnen één dag vrijblijvend een offerte'|trans
} %}
</div>
</div>
{% if hasImage %}
<div class=\"md:flex md:items-center
{{ pimcore_select('inverted').data ? 'md:order-1' : 'md:order-2' }}
{{ hideMediaOnMobile ? 'hidden md:block' : '' }}
\">
{% if overrideImage is defined and overrideImage and pimcore_image('image').isEmpty() %}
{% include('areas/content-brick/partials/override-image.html.twig') %}
{% else %}
{{ pimcore_image('image', {
class: 'block overflow-hidden rounded-md',
thumbnail: 'content',
pictureAttributes: {class: 'block overflow-hidden rounded-md'}
}) | raw }}
{% endif %}
</div>
{% endif %}
</div>", "areas/content-brick/layouts/text-image.html.twig", "/home/forge/testing.coolworld.ptchr.dev/templates/areas/content-brick/layouts/text-image.html.twig");
}
public function checkSecurity()
{
static $tags = ["set" => 2, "if" => 18, "include" => 28];
static $filters = ["escape" => 50, "trans" => 50, "raw" => 112];
static $functions = ["pimcore_image" => 2, "pimcore_checkbox" => 4, "pimcore_select" => 10, "pimcore_input" => 13];
try {
$this->sandbox->checkSecurity(
['set', 'if', 'include'],
['escape', 'trans', 'raw'],
['pimcore_image', 'pimcore_checkbox', 'pimcore_select', 'pimcore_input'],
$this->source
);
} 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;
}
}
}