<?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;
/* content/image/view.html.twig */
class __TwigTemplate_b83923bd8b10efd578da69181016101a 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_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "content/image/view.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "content/image/view.html.twig"));
// line 1
$context["thumbnaileName"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "thumbnaileName");
// line 2
$context["contentImage"] = CoreExtension::getAttribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "image", "contentImage", ["thumbnail" => $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["thumbnaileName"]) || array_key_exists("thumbnaileName", $context) ? $context["thumbnaileName"] : (function () { throw new RuntimeError('Variable "thumbnaileName" does not exist.', 2, $this->source); })()), "text", [], "any", false, false, true, 2), 2, $this->source)]), "getThumbnail", [CoreExtension::getAttribute($this->env, $this->source, (isset($context["thumbnaileName"]) || array_key_exists("thumbnaileName", $context) ? $context["thumbnaileName"] : (function () { throw new RuntimeError('Variable "thumbnaileName" does not exist.', 2, $this->source); })()), "text", [], "any", false, false, true, 2)], "method", false, false, true, 2);
// line 3
$context["caption"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "input", "caption");
// line 4
$context["imageLink"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "link", "imageLink");
// line 5
yield "
";
// line 6
if ((array_key_exists("container", $context) && ((isset($context["container"]) || array_key_exists("container", $context) ? $context["container"] : (function () { throw new RuntimeError('Variable "container" does not exist.', 6, $this->source); })()) == false))) {
// line 7
yield " ";
$context["containerClass"] = "";
}
// line 9
yield "
";
// line 11
if ((isset($context["contentImage"]) || array_key_exists("contentImage", $context) ? $context["contentImage"] : (function () { throw new RuntimeError('Variable "contentImage" does not exist.', 11, $this->source); })())) {
// line 12
yield " ";
$context["imageRendered"] = ('' === $tmp = \Twig\Extension\CoreExtension::captureOutput((function () use (&$context, $macros, $blocks) {
// line 13
yield " <figure class=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["align"]) || array_key_exists("align", $context) ? $context["align"] : (function () { throw new RuntimeError('Variable "align" does not exist.', 13, $this->source); })()), "getData", [], "method", false, false, true, 13), 13, $this->source), "html", null, true);
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed((isset($context["containerClass"]) || array_key_exists("containerClass", $context) ? $context["containerClass"] : (function () { throw new RuntimeError('Variable "containerClass" does not exist.', 13, $this->source); })()), 13, $this->source), "html", null, true);
yield " ";
yield ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["lightbox"]) || array_key_exists("lightbox", $context) ? $context["lightbox"] : (function () { throw new RuntimeError('Variable "lightbox" does not exist.', 13, $this->source); })()), "getData", [], "method", false, false, true, 13)) ? ("lightbox") : (""));
yield "\" data-src=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["contentImage"]) || array_key_exists("contentImage", $context) ? $context["contentImage"] : (function () { throw new RuntimeError('Variable "contentImage" does not exist.', 13, $this->source); })()), "asset", [], "any", false, false, true, 13), "path", [], "any", false, false, true, 13), 13, $this->source), "html", null, true);
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["contentImage"]) || array_key_exists("contentImage", $context) ? $context["contentImage"] : (function () { throw new RuntimeError('Variable "contentImage" does not exist.', 13, $this->source); })()), "asset", [], "any", false, false, true, 13), "filename", [], "any", false, false, true, 13), 13, $this->source), "html", null, true);
yield "\">
";
// line 14
yield $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["contentImage"]) || array_key_exists("contentImage", $context) ? $context["contentImage"] : (function () { throw new RuntimeError('Variable "contentImage" does not exist.', 14, $this->source); })()), "getHtml", [["alt" => CoreExtension::getAttribute($this->env, $this->source, // line 15
(isset($context["altText"]) || array_key_exists("altText", $context) ? $context["altText"] : (function () { throw new RuntimeError('Variable "altText" does not exist.', 15, $this->source); })()), "getData", [], "method", false, false, true, 15), "title" => CoreExtension::getAttribute($this->env, $this->source, // line 16
(isset($context["title"]) || array_key_exists("title", $context) ? $context["title"] : (function () { throw new RuntimeError('Variable "title" does not exist.', 16, $this->source); })()), "getData", [], "method", false, false, true, 16)]], "method", false, false, true, 14), 14, $this->source);
// line 17
yield "
";
// line 18
if ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["caption"]) || array_key_exists("caption", $context) ? $context["caption"] : (function () { throw new RuntimeError('Variable "caption" does not exist.', 18, $this->source); })()), "getData", [], "method", false, false, true, 18) != "")) {
// line 19
yield " <figcaption>";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["caption"]) || array_key_exists("caption", $context) ? $context["caption"] : (function () { throw new RuntimeError('Variable "caption" does not exist.', 19, $this->source); })()), "getData", [], "method", false, false, true, 19), 19, $this->source), "html", null, true);
yield "</figcaption>
";
}
// line 21
yield " </figure>
";
yield from [];
})())) ? '' : new Markup($tmp, $this->env->getCharset());
// line 23
yield "
";
// line 24
if ((isset($context["imageLink"]) || array_key_exists("imageLink", $context) ? $context["imageLink"] : (function () { throw new RuntimeError('Variable "imageLink" does not exist.', 24, $this->source); })())) {
// line 25
yield " <a href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["imageLink"]) || array_key_exists("imageLink", $context) ? $context["imageLink"] : (function () { throw new RuntimeError('Variable "imageLink" does not exist.', 25, $this->source); })()), "getHref", [], "method", false, false, true, 25), 25, $this->source), "html", null, true);
yield "\" target=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["imageLink"]) || array_key_exists("imageLink", $context) ? $context["imageLink"] : (function () { throw new RuntimeError('Variable "imageLink" does not exist.', 25, $this->source); })()), "getTarget", [], "method", false, false, true, 25), 25, $this->source), "html", null, true);
yield "\" title=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["imageLink"]) || array_key_exists("imageLink", $context) ? $context["imageLink"] : (function () { throw new RuntimeError('Variable "imageLink" does not exist.', 25, $this->source); })()), "getTitle", [], "any", false, false, true, 25), 25, $this->source), "html", null, true);
yield "\">
";
// line 26
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed((isset($context["imageRendered"]) || array_key_exists("imageRendered", $context) ? $context["imageRendered"] : (function () { throw new RuntimeError('Variable "imageRendered" does not exist.', 26, $this->source); })()), 26, $this->source), "html", null, true);
yield "
</a>
";
} else {
// line 29
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed((isset($context["imageRendered"]) || array_key_exists("imageRendered", $context) ? $context["imageRendered"] : (function () { throw new RuntimeError('Variable "imageRendered" does not exist.', 29, $this->source); })()), 29, $this->source), "html", null, true);
yield "
";
}
// line 31
yield "
";
}
// line 33
yield "
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "content/image/view.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 138 => 33, 134 => 31, 128 => 29, 122 => 26, 113 => 25, 111 => 24, 108 => 23, 103 => 21, 97 => 19, 95 => 18, 92 => 17, 90 => 16, 89 => 15, 88 => 14, 76 => 13, 73 => 12, 71 => 11, 67 => 9, 63 => 7, 61 => 6, 58 => 5, 56 => 4, 54 => 3, 52 => 2, 50 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% set thumbnaileName = pimcore_select(\"thumbnaileName\") %}
{% set contentImage = pimcore_image(\"contentImage\", {\"thumbnail\": thumbnaileName.text}).getThumbnail(thumbnaileName.text) %}
{% set caption = pimcore_input(\"caption\") %}
{% set imageLink = pimcore_link('imageLink') %}
{% if container is defined and container == false %}
{% set containerClass = '' %}
{% endif %}
{% if contentImage %}
{% set imageRendered %}
<figure class=\"{{ align.getData() }} {{ containerClass }} {{ lightbox.getData()?'lightbox':'' }}\" data-src=\"{{ contentImage.asset.path }}{{ contentImage.asset.filename }}\">
{{ contentImage.getHtml({
'alt' : altText.getData(),
'title' : title.getData()
}) |raw }}
{% if caption.getData() != '' %}
<figcaption>{{ caption.getData() }}</figcaption>
{% endif %}
</figure>
{% endset %}
{% if imageLink %}
<a href=\"{{ imageLink.getHref() }}\" target=\"{{ imageLink.getTarget() }}\" title=\"{{ imageLink.getTitle }}\">
{{ imageRendered }}
</a>
{% else %}
{{ imageRendered }}
{% endif %}
{% endif %}
", "content/image/view.html.twig", "/var/www/vhosts/mensa-fasching.de/uat/releases/20250218080531/templates/content/image/view.html.twig");
}
public function checkSecurity()
{
static $tags = ["set" => 1, "if" => 6];
static $filters = ["escape" => 13, "raw" => 17];
static $functions = ["pimcore_select" => 1, "pimcore_image" => 2, "pimcore_input" => 3, "pimcore_link" => 4];
try {
$this->sandbox->checkSecurity(
['set', 'if'],
['escape', 'raw'],
['pimcore_select', 'pimcore_image', 'pimcore_input', 'pimcore_link'],
$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;
}
}
}