var/cache/dev/twig/b9/b971de7aec7e17f1eba5b03c5873cde0.php line 48

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. /* content/thumbnails.html.twig */
  14. class __TwigTemplate_c18745b209fdfb807de3e5c4ad82ee36 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->blocks = [
  23.             'content' => [$this'block_content'],
  24.         ];
  25.     }
  26.     protected function doGetParent(array $context)
  27.     {
  28.         // line 1
  29.         return "layouts/layout.html.twig";
  30.     }
  31.     protected function doDisplay(array $context, array $blocks = [])
  32.     {
  33.         $macros $this->macros;
  34.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  35.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""content/thumbnails.html.twig"));
  36.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  37.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""content/thumbnails.html.twig"));
  38.         $this->parent $this->loadTemplate("layouts/layout.html.twig""content/thumbnails.html.twig"1);
  39.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  40.         
  41.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  42.         
  43.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  44.     }
  45.     // line 3
  46.     public function block_content($context, array $blocks = [])
  47.     {
  48.         $macros $this->macros;
  49.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  50.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  51.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  52.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  53.         // line 4
  54.         echo "
  55.     <div id=\"main-content\" class=\"main-content\" >
  56.         ";
  57.         // line 7
  58.         echo twig_include($this->env$context"includes/content-headline.html.twig");
  59.         echo "
  60.         ";
  61.         // line 10
  62.         echo "        ";
  63.         $context["image"] = ((twig_get_attribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"image""image"), "getImage", [], "method"falsefalsefalse10)) ? (twig_get_attribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"image""image"), "getImage", [], "method"falsefalsefalse10)) : (Pimcore\Model\Asset::getById(341)));
  64.         // line 11
  65.         echo "
  66.         <p>
  67.             ";
  68.         // line 14
  69.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Original Dimensions of the Image:"), "html"nulltrue);
  70.         echo "
  71.             ";
  72.         // line 15
  73.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["image"]) || array_key_exists("image"$context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.'15$this->source); })()), "width", [], "any"falsefalsefalse15), "html"nulltrue);
  74.         echo " x ";
  75.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["image"]) || array_key_exists("image"$context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.'15$this->source); })()), "height", [], "any"falsefalsefalse15), "html"nulltrue);
  76.         echo "
  77.         </p>
  78.         <div class=\"mb-5\">
  79.             ";
  80.         // line 19
  81.         echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"image""image", ["thumbnail" => "content""imgAttributes" => ["class" => "img-responsive"]]);
  82.         echo "
  83.         </div>
  84.         ";
  85.         // line 23
  86.         $context["thumbnails"] = ["Cover" => "exampleCover""Contain" => "exampleContain""Frame" => "exampleFrame""Rotate" => "exampleRotate""Resize" => "exampleResize""Scale by Width" => "exampleScaleWidth""Scale by Height" => "exampleScaleHeight""Contain & Overlay" => "exampleOverlay""Rounded Corners" => "exampleCorners""Colors" => "exampleColor""Sepia" => "exampleSepia""Grayscale" => "exampleGrayscale""Mask" => "exampleMask""Combined 1" => "exampleCombined1""Combined 2" => "exampleCombined2"];
  87.         // line 40
  88.         echo "
  89.         <section class=\"thumbnail-examples\">
  90.             ";
  91.         // line 44
  92.         $context['_parent'] = $context;
  93.         $context['_seq'] = twig_ensure_traversable((isset($context["thumbnails"]) || array_key_exists("thumbnails"$context) ? $context["thumbnails"] : (function () { throw new RuntimeError('Variable "thumbnails" does not exist.'44$this->source); })()));
  94.         $context['loop'] = [
  95.           'parent' => $context['_parent'],
  96.           'index0' => 0,
  97.           'index'  => 1,
  98.           'first'  => true,
  99.         ];
  100.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  101.             $length count($context['_seq']);
  102.             $context['loop']['revindex0'] = $length 1;
  103.             $context['loop']['revindex'] = $length;
  104.             $context['loop']['length'] = $length;
  105.             $context['loop']['last'] = === $length;
  106.         }
  107.         foreach ($context['_seq'] as $context["title"] => $context["name"]) {
  108.             // line 45
  109.             echo "
  110.                 ";
  111.             // line 46
  112.             if (((twig_get_attribute($this->env$this->source$context["loop"], "index0", [], "any"falsefalsefalse46) % 3) == 0)) {
  113.                 // line 47
  114.                 echo "                    <div class=\"row\">
  115.                 ";
  116.             }
  117.             // line 49
  118.             echo "
  119.                 <div class=\"col-lg-4\">
  120.                     ";
  121.             // line 51
  122.             $context["thumbnail"] = twig_get_attribute($this->env$this->source, (isset($context["image"]) || array_key_exists("image"$context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.'51$this->source); })()), "getThumbnail", [=> $context["name"]], "method"falsefalsefalse51);
  123.             // line 52
  124.             echo "
  125.                     <div class=\"img-container\">
  126.                         ";
  127.             // line 54
  128.             echo twig_get_attribute($this->env$this->source, (isset($context["thumbnail"]) || array_key_exists("thumbnail"$context) ? $context["thumbnail"] : (function () { throw new RuntimeError('Variable "thumbnail" does not exist.'54$this->source); })()), "getHTML", [], "method"falsefalsefalse54);
  129.             echo "
  130.                     </div>
  131.                     <h5>";
  132.             // line 57
  133.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($context["title"]), "html"nulltrue);
  134.             echo "</h5>
  135.                     <div class=\"img-dimensions\">
  136.                         ";
  137.             // line 60
  138.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Dimensions:"), "html"nulltrue);
  139.             echo "
  140.                         ";
  141.             // line 61
  142.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["thumbnail"]) || array_key_exists("thumbnail"$context) ? $context["thumbnail"] : (function () { throw new RuntimeError('Variable "thumbnail" does not exist.'61$this->source); })()), "width", [], "any"falsefalsefalse61), "html"nulltrue);
  143.             echo " x ";
  144.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["thumbnail"]) || array_key_exists("thumbnail"$context) ? $context["thumbnail"] : (function () { throw new RuntimeError('Variable "thumbnail" does not exist.'61$this->source); })()), "height", [], "any"falsefalsefalse61), "html"nulltrue);
  145.             echo "
  146.                     </div>
  147.                 </div>
  148.                 ";
  149.             // line 65
  150.             if ((twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsefalse65) || (((twig_get_attribute($this->env$this->source$context["loop"], "index0", [], "any"falsefalsefalse65) + 1) % 3) == 0))) {
  151.                 // line 66
  152.                 echo "                    </div>
  153.                 ";
  154.             }
  155.             // line 68
  156.             echo "            ";
  157.             ++$context['loop']['index0'];
  158.             ++$context['loop']['index'];
  159.             $context['loop']['first'] = false;
  160.             if (isset($context['loop']['length'])) {
  161.                 --$context['loop']['revindex0'];
  162.                 --$context['loop']['revindex'];
  163.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  164.             }
  165.         }
  166.         $_parent $context['_parent'];
  167.         unset($context['_seq'], $context['_iterated'], $context['title'], $context['name'], $context['_parent'], $context['loop']);
  168.         $context array_intersect_key($context$_parent) + $_parent;
  169.         // line 69
  170.         echo "        </section>
  171.     </div>
  172.     ";
  173.         // line 73
  174.         echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"areablock""content_bottom");
  175.         echo "
  176. ";
  177.         
  178.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  179.         
  180.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  181.     }
  182.     public function getTemplateName()
  183.     {
  184.         return "content/thumbnails.html.twig";
  185.     }
  186.     public function isTraitable()
  187.     {
  188.         return false;
  189.     }
  190.     public function getDebugInfo()
  191.     {
  192.         return array (  201 => 73,  195 => 69,  181 => 68,  177 => 66,  175 => 65,  166 => 61,  162 => 60,  156 => 57,  150 => 54,  146 => 52,  144 => 51,  140 => 49,  136 => 47,  134 => 46,  131 => 45,  114 => 44,  108 => 40,  106 => 23,  99 => 19,  90 => 15,  86 => 14,  81 => 11,  78 => 10,  73 => 7,  68 => 4,  58 => 3,  35 => 1,);
  193.     }
  194.     public function getSourceContext()
  195.     {
  196.         return new Source("{% extends 'layouts/layout.html.twig' %}
  197. {% block content %}
  198.     <div id=\"main-content\" class=\"main-content\" >
  199.         {{ include('includes/content-headline.html.twig') }}
  200.         {# this is just used for demonstration #}
  201.         {% set image =  pimcore_image('image').getImage() ?: pimcore_asset(341) %}
  202.         <p>
  203.             {{ 'Original Dimensions of the Image:'|trans }}
  204.             {{ image.width }} x {{ image.height }}
  205.         </p>
  206.         <div class=\"mb-5\">
  207.             {{ pimcore_image('image', { thumbnail: 'content', imgAttributes: {class: 'img-responsive'}}) }}
  208.         </div>
  209.         {% set thumbnails = {
  210.             'Cover': 'exampleCover',
  211.             'Contain': 'exampleContain',
  212.             'Frame': 'exampleFrame',
  213.             'Rotate': 'exampleRotate',
  214.             'Resize': 'exampleResize',
  215.             'Scale by Width': 'exampleScaleWidth',
  216.             'Scale by Height': 'exampleScaleHeight',
  217.             'Contain & Overlay': 'exampleOverlay',
  218.             'Rounded Corners': 'exampleCorners',
  219.             'Colors': 'exampleColor',
  220.             'Sepia': 'exampleSepia',
  221.             'Grayscale': 'exampleGrayscale',
  222.             'Mask': 'exampleMask',
  223.             'Combined 1': 'exampleCombined1',
  224.             'Combined 2': 'exampleCombined2'
  225.         } %}
  226.         <section class=\"thumbnail-examples\">
  227.             {% for title, name in thumbnails %}
  228.                 {% if loop.index0 % 3 == 0 %}
  229.                     <div class=\"row\">
  230.                 {% endif %}
  231.                 <div class=\"col-lg-4\">
  232.                     {% set thumbnail = image.getThumbnail(name) %}
  233.                     <div class=\"img-container\">
  234.                         {{ thumbnail.getHTML()|raw }}
  235.                     </div>
  236.                     <h5>{{ title|trans }}</h5>
  237.                     <div class=\"img-dimensions\">
  238.                         {{ 'Dimensions:'|trans }}
  239.                         {{ thumbnail.width }} x {{ thumbnail.height }}
  240.                     </div>
  241.                 </div>
  242.                 {% if loop.last or ((loop.index0 + 1) % 3 == 0) %}
  243.                     </div>
  244.                 {% endif %}
  245.             {% endfor %}
  246.         </section>
  247.     </div>
  248.     {{ pimcore_areablock('content_bottom') }}
  249. {% endblock %}
  250. ""content/thumbnails.html.twig""/var/www/html/siteone/templates/content/thumbnails.html.twig");
  251.     }
  252. }