var/cache/dev/twig/8a/8aeae56b2e68e5b0f21f0185ffe04967.php line 35

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* areas/wysiwyg-with-images/view.html.twig */
  14. class __TwigTemplate_818a36bb48405c9bc5b45c3df18c28eb extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->parent false;
  23.         $this->blocks = [
  24.         ];
  25.         $this->sandbox $this->env->getExtension('\Twig\Extension\SandboxExtension');
  26.         $this->checkSecurity();
  27.     }
  28.     protected function doDisplay(array $context, array $blocks = [])
  29.     {
  30.         $macros $this->macros;
  31.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  32.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""areas/wysiwyg-with-images/view.html.twig"));
  33.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  34.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""areas/wysiwyg-with-images/view.html.twig"));
  35.         // line 1
  36.         $macros["macros"] = $this->macros["macros"] = $this->loadTemplate("includes/macros.html.twig""areas/wysiwyg-with-images/view.html.twig"1)->unwrap();
  37.         // line 2
  38.         echo "
  39. ";
  40.         // line 3
  41.         $context["content"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"wysiwyg""content");
  42.         // line 4
  43.         echo "
  44. ";
  45.         // line 6
  46.         if (twig_test_empty(twig_get_attribute($this->env$this->source, (isset($context["document"]) || array_key_exists("document"$context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.'6$this->source); })()), "getDescription", [], "method"falsefalsetrue6))) {
  47.             // line 7
  48.             echo "    ";
  49.             twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_head_meta')->getCallable()(), "setDescription", [twig_get_attribute($this->env$this->source, (isset($context["content"]) || array_key_exists("content"$context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.'7$this->source); })()), "getData", [], "method"falsefalsetrue7), 160], "method"falsefalsetrue7);
  50.         }
  51.         // line 9
  52.         echo "
  53. <section class=\"area-wysiwyg\">
  54.     <div class=\"row\">
  55.         <div class=\"col-sm-8\">
  56.             ";
  57.         // line 13
  58.         ob_start();
  59.         // line 14
  60.         echo "                ";
  61.         echo $this->sandbox->ensureToStringAllowed((isset($context["content"]) || array_key_exists("content"$context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.'14$this->source); })()), 14$this->source);
  62.         echo "
  63.             ";
  64.         $___internal_parse_0_ = ('' === $tmp ob_get_clean()) ? '' : new Markup($tmp$this->env->getCharset());
  65.         // line 13
  66.         echo $this->extensions['Pimcore\Twig\Extension\GlossaryExtension']->applyGlossary($___internal_parse_0_);
  67.         // line 16
  68.         echo "        </div>
  69.         <div class=\"col-sm-4\">
  70.             ";
  71.         // line 18
  72.         $context['_parent'] = $context;
  73.         $context['_seq'] = twig_ensure_traversable($this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->getBlockIterator($this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"block""images")));
  74.         foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
  75.             // line 19
  76.             echo "                ";
  77.             echo twig_call_macro($macros["macros"], "macro_image_link", [$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"image""image", ["thumbnail" => "galleryThumbnail""imgAttributes" => ["class" => "img-responsive img-thumbnail mb-3"]]), (isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'19$this->source); })()), "galleryLightbox"], 19$context$this->getSourceContext());
  78.             echo "
  79.             ";
  80.         }
  81.         $_parent $context['_parent'];
  82.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
  83.         $context array_intersect_key($context$_parent) + $_parent;
  84.         // line 21
  85.         echo "        </div>
  86.     </div>
  87. </section>
  88. ";
  89.         
  90.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  91.         
  92.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  93.     }
  94.     /**
  95.      * @codeCoverageIgnore
  96.      */
  97.     public function getTemplateName()
  98.     {
  99.         return "areas/wysiwyg-with-images/view.html.twig";
  100.     }
  101.     /**
  102.      * @codeCoverageIgnore
  103.      */
  104.     public function isTraitable()
  105.     {
  106.         return false;
  107.     }
  108.     /**
  109.      * @codeCoverageIgnore
  110.      */
  111.     public function getDebugInfo()
  112.     {
  113.         return array (  94 => 21,  85 => 19,  81 => 18,  77 => 16,  75 => 13,  69 => 14,  67 => 13,  61 => 9,  57 => 7,  55 => 6,  52 => 4,  50 => 3,  47 => 2,  45 => 1,);
  114.     }
  115.     public function getSourceContext()
  116.     {
  117.         return new Source("{% import 'includes/macros.html.twig' as macros %}
  118. {% set content = pimcore_wysiwyg('content') %}
  119. {# add autogenerated meta description #}
  120. {% if document.getDescription() is empty %}
  121.     {% do pimcore_head_meta().setDescription(content.getData(), 160) %}
  122. {% endif %}
  123. <section class=\"area-wysiwyg\">
  124.     <div class=\"row\">
  125.         <div class=\"col-sm-8\">
  126.             {% apply pimcore_glossary %}
  127.                 {{ content|raw }}
  128.             {% endapply %}
  129.         </div>
  130.         <div class=\"col-sm-4\">
  131.             {% for i in pimcore_iterate_block(pimcore_block('images')) %}
  132.                 {{ macros.image_link(pimcore_image('image', { thumbnail: 'galleryThumbnail', imgAttributes: {class: 'img-responsive img-thumbnail mb-3' }}), editmode, 'galleryLightbox') }}
  133.             {% endfor %}
  134.         </div>
  135.     </div>
  136. </section>
  137. ""areas/wysiwyg-with-images/view.html.twig""/var/www/dev-10/templates/areas/wysiwyg-with-images/view.html.twig");
  138.     }
  139.     
  140.     public function checkSecurity()
  141.     {
  142.         static $tags = array("import" => 1"set" => 3"if" => 6"do" => 7"apply" => 13"for" => 18);
  143.         static $filters = array("raw" => 14"pimcore_glossary" => 13);
  144.         static $functions = array("pimcore_wysiwyg" => 3"pimcore_head_meta" => 7"pimcore_iterate_block" => 18"pimcore_block" => 18"pimcore_image" => 19);
  145.         try {
  146.             $this->sandbox->checkSecurity(
  147.                 ['import''set''if''do''apply''for'],
  148.                 ['raw''pimcore_glossary'],
  149.                 ['pimcore_wysiwyg''pimcore_head_meta''pimcore_iterate_block''pimcore_block''pimcore_image']
  150.             );
  151.         } catch (SecurityError $e) {
  152.             $e->setSourceContext($this->source);
  153.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  154.                 $e->setTemplateLine($tags[$e->getTagName()]);
  155.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  156.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  157.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  158.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  159.             }
  160.             throw $e;
  161.         }
  162.     }
  163. }