<?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;
/* areas/image/view.html.twig */
class __TwigTemplate_a2de8c5fd7a3226ce07ca50324874977 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", "areas/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", "areas/image/view.html.twig"));
// line 6
echo "
";
// line 7
if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 7, $this->source); })())) {
// line 8
echo "<div class=\"admin-container admin-container--limited-width\">
\t<div class=\"admin-container__section\">
\t\t<span class=\"admin-container__title\">";
// line 10
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("brick.image.title", [], "admin"), "html", null, true);
echo "</span>
\t</div>
\t<div class=\"admin-container__configurations\">
\t\t<div class=\"admin-config-item\">
\t\t\t<span class=\"admin-config-item__label\">";
// line 14
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("brick.image.option.link", [], "admin"), "html", null, true);
echo ":</span>
\t\t\t";
// line 15
echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "link", "link", ["noText" => true]);
// line 17
echo "
\t\t\t<br>
\t\t\t<span class=\"admin-config-item__label\">";
// line 21
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("brick.image.option.border", [], "admin"), "html", null, true);
echo ":</span>
\t\t\t";
// line 22
echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "checkbox", "border", ["reload" => true]);
// line 24
echo "
\t\t</div>
\t</div>
</div>
";
}
// line 29
echo "
";
// line 30
$context["sectionIndex"] = ((array_key_exists("sectionIndex", $context)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed((isset($context["sectionIndex"]) || array_key_exists("sectionIndex", $context) ? $context["sectionIndex"] : (function () { throw new RuntimeError('Variable "sectionIndex" does not exist.', 30, $this->source); })()), 30, $this->source), 0)) : (0));
// line 31
$context["gridIndex"] = ((array_key_exists("gridIndex", $context)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed((isset($context["gridIndex"]) || array_key_exists("gridIndex", $context) ? $context["gridIndex"] : (function () { throw new RuntimeError('Variable "gridIndex" does not exist.', 31, $this->source); })()), 31, $this->source), 0)) : (0));
// line 32
echo "
<!-- thumb: ";
// line 33
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["thumbnail"]) || array_key_exists("thumbnail", $context) ? $context["thumbnail"] : (function () { throw new RuntimeError('Variable "thumbnail" does not exist.', 33, $this->source); })()), 33, $this->source), "html", null, true);
echo " | section-idx: ";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["sectionIndex"]) || array_key_exists("sectionIndex", $context) ? $context["sectionIndex"] : (function () { throw new RuntimeError('Variable "sectionIndex" does not exist.', 33, $this->source); })()), 33, $this->source), "html", null, true);
echo " | grid-idx: ";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["gridIndex"]) || array_key_exists("gridIndex", $context) ? $context["gridIndex"] : (function () { throw new RuntimeError('Variable "gridIndex" does not exist.', 33, $this->source); })()), 33, $this->source), "html", null, true);
echo " -->
<div class=\"area image ";
// line 35
echo twig_escape_filter($this->env, twig_join_filter($this->sandbox->ensureToStringAllowed((isset($context["cssClasses"]) || array_key_exists("cssClasses", $context) ? $context["cssClasses"] : (function () { throw new RuntimeError('Variable "cssClasses" does not exist.', 35, $this->source); })()), 35, $this->source), " "), "html", null, true);
echo "\" style=\"";
echo twig_escape_filter($this->env, twig_join_filter($this->sandbox->ensureToStringAllowed((isset($context["cssStyles"]) || array_key_exists("cssStyles", $context) ? $context["cssStyles"] : (function () { throw new RuntimeError('Variable "cssStyles" does not exist.', 35, $this->source); })()), 35, $this->source), " "), "html", null, true);
echo "\">
\t";
// line 37
echo "\t";
$context["preventLoadingLazy"] = ( !(isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 37, $this->source); })()) && (((isset($context["sectionIndex"]) || array_key_exists("sectionIndex", $context) ? $context["sectionIndex"] : (function () { throw new RuntimeError('Variable "sectionIndex" does not exist.', 37, $this->source); })()) == 0) && ((isset($context["gridIndex"]) || array_key_exists("gridIndex", $context) ? $context["gridIndex"] : (function () { throw new RuntimeError('Variable "gridIndex" does not exist.', 37, $this->source); })()) <= 1)));
// line 38
echo "
\t";
// line 40
$context["content"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "image", "image", ["class" => "image__image", "lowQualityPlaceholder" => false, "thumbnail" => (( // line 43
array_key_exists("thumbnail", $context)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed((isset($context["thumbnail"]) || array_key_exists("thumbnail", $context) ? $context["thumbnail"] : (function () { throw new RuntimeError('Variable "thumbnail" does not exist.', 43, $this->source); })()), 43, $this->source), false)) : (false)), "imgAttributes" => ["loading" => (( // line 45
(isset($context["preventLoadingLazy"]) || array_key_exists("preventLoadingLazy", $context) ? $context["preventLoadingLazy"] : (function () { throw new RuntimeError('Variable "preventLoadingLazy" does not exist.', 45, $this->source); })())) ? ("eager") : ("lazy")), "decoding" => (( // line 46
(isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 46, $this->source); })())) ? ("sync") : ("async"))]]);
// line 50
echo "
\t";
// line 52
if (( !(isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 52, $this->source); })()) && (isset($context["hasLink"]) || array_key_exists("hasLink", $context) ? $context["hasLink"] : (function () { throw new RuntimeError('Variable "hasLink" does not exist.', 52, $this->source); })()))) {
// line 53
echo "\t\t";
// line 54
$this->loadTemplate("includes/partials/link-wrapper.html.twig", "areas/image/view.html.twig", 54)->display(twig_array_merge($context, ["content" => // line 55
(isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 55, $this->source); })()), "href" => twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "link", "link"), "getHref", [], "method", false, false, true, 56), "title" => twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "link", "link"), "getTitle", [], "method", false, false, true, 57)]));
// line 60
echo "\t";
} else {
// line 61
echo "\t\t";
echo $this->sandbox->ensureToStringAllowed((isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 61, $this->source); })()), 61, $this->source);
echo "
\t";
}
// line 63
echo "</div>";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "areas/image/view.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 142 => 63, 136 => 61, 133 => 60, 131 => 55, 130 => 54, 128 => 53, 126 => 52, 122 => 50, 120 => 46, 119 => 45, 118 => 43, 117 => 40, 114 => 38, 111 => 37, 105 => 35, 96 => 33, 93 => 32, 91 => 31, 89 => 30, 86 => 29, 79 => 24, 77 => 22, 73 => 21, 67 => 17, 65 => 15, 61 => 14, 54 => 10, 50 => 8, 48 => 7, 45 => 6,);
}
public function getSourceContext()
{
return new Source("{#
project: Pimcore
User: EBiermann
Year: 2022
#}
{% if editmode %}
<div class=\"admin-container admin-container--limited-width\">
\t<div class=\"admin-container__section\">
\t\t<span class=\"admin-container__title\">{{ 'brick.image.title'|trans({}, 'admin') }}</span>
\t</div>
\t<div class=\"admin-container__configurations\">
\t\t<div class=\"admin-config-item\">
\t\t\t<span class=\"admin-config-item__label\">{{ 'brick.image.option.link'|trans({}, 'admin') }}:</span>
\t\t\t{{
\t\t\t\tpimcore_link('link', { 'noText': true })
\t\t\t}}
\t\t\t<br>
\t\t\t<span class=\"admin-config-item__label\">{{ 'brick.image.option.border'|trans({}, 'admin') }}:</span>
\t\t\t{{
\t\t\t\tpimcore_checkbox('border', { 'reload': true })
\t\t\t}}
\t\t</div>
\t</div>
</div>
{% endif %}
{% set sectionIndex = sectionIndex|default(0) %}
{% set gridIndex = gridIndex|default(0) %}
<!-- thumb: {{ thumbnail }} | section-idx: {{ sectionIndex }} | grid-idx: {{ gridIndex }} -->
<div class=\"area image {{ cssClasses|join(' ') }}\" style=\"{{ cssStyles|join(' ') }}\">
\t{# LCP, should not be lazy loaded (images on init page load abvoe the fold) #}
\t{% set preventLoadingLazy = not editmode and (sectionIndex == 0 and gridIndex <= 1) %}
\t{%
\t\tset content = pimcore_image('image', {
\t\t\t'class': 'image__image',
\t\t\t'lowQualityPlaceholder': false,
\t\t\t'thumbnail': thumbnail|default(false),
\t\t\t'imgAttributes': {
\t\t\t\t'loading': preventLoadingLazy ? 'eager' : 'lazy',
\t\t\t\t'decoding': editmode ? 'sync' : 'async'
\t\t\t}
\t\t})
\t%}
\t{% if not editmode and hasLink %}
\t\t{%
\t\t\tinclude 'includes/partials/link-wrapper.html.twig' with {
\t\t\t\tcontent: content,
\t\t\t\thref: pimcore_link('link').getHref(),
\t\t\t\ttitle: pimcore_link('link').getTitle()
\t\t\t}
\t\t%}
\t{% else %}
\t\t{{ content|raw }}
\t{% endif %}
</div>", "areas/image/view.html.twig", "/var/www/snr/staging.nuernberger-bratwuerste.de/templates/areas/image/view.html.twig");
}
public function checkSecurity()
{
static $tags = array("if" => 7, "set" => 30, "include" => 54);
static $filters = array("escape" => 10, "trans" => 10, "default" => 30, "join" => 35, "raw" => 61);
static $functions = array("pimcore_link" => 16, "pimcore_checkbox" => 23, "pimcore_image" => 40);
try {
$this->sandbox->checkSecurity(
['if', 'set', 'include'],
['escape', 'trans', 'default', 'join', 'raw'],
['pimcore_link', 'pimcore_checkbox', 'pimcore_image']
);
} 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;
}
}
}