var/cache/dev/twig/c4/c40d1456950611a0bc2c6b485ceb9cd6.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. /* news/detail.html.twig */
  14. class __TwigTemplate_08302faebbe1f1b6d1725109bdea9a7c 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 3
  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""news/detail.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""news/detail.html.twig"));
  38.         $this->parent $this->loadTemplate("layouts/layout.html.twig""news/detail.html.twig"3);
  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 6
  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 7
  54.         echo "
  55.     <div id=\"main-content\" class=\"main-content mb-5\">
  56.         <div class=\"page-header\">
  57.             <h1>";
  58.         // line 11
  59.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["news"]) || array_key_exists("news"$context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.'11$this->source); })()), "title", [], "any"falsefalsefalse11), "html"nulltrue);
  60.         echo "</h1>
  61.         </div>
  62.         <div class=\"text-muted mb-3\">";
  63.         // line 14
  64.         echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["news"]) || array_key_exists("news"$context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.'14$this->source); })()), "date", [], "any"falsefalsefalse14), "Y-m-d h:i A"), "html"nulltrue);
  65.         echo "</div>
  66.         <div class=\"display-6\">
  67.             ";
  68.         // line 16
  69.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["news"]) || array_key_exists("news"$context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.'16$this->source); })()), "shortText", [], "any"falsefalsefalse16), "html"nulltrue);
  70.         echo "
  71.         </div>
  72.         ";
  73.         // line 19
  74.         if (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["news"]) || array_key_exists("news"$context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.'19$this->source); })()), "gallery", [], "any"falsefalsefalse19), "items", [], "any"falsefalsefalse19)) {
  75.             // line 20
  76.             echo "
  77.             <div class=\"row\">
  78.                 ";
  79.             // line 23
  80.             $context['_parent'] = $context;
  81.             $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["news"]) || array_key_exists("news"$context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.'23$this->source); })()), "gallery", [], "any"falsefalsefalse23), "items", [], "any"falsefalsefalse23));
  82.             foreach ($context['_seq'] as $context["_key"] => $context["image"]) {
  83.                 // line 24
  84.                 echo "
  85.                     ";
  86.                 // line 25
  87.                 if (twig_get_attribute($this->env$this->source$context["image"], "image", [], "any"falsefalsefalse25)) {
  88.                     // line 26
  89.                     echo "
  90.                         <div class=\"col-sm-3 mt-3\">
  91.                             <a href=\"";
  92.                     // line 29
  93.                     echo twig_get_attribute($this->env$this->source$context["image"], "getThumbnail", [=> "galleryLightbox"], "method"falsefalsefalse29);
  94.                     echo "\" class=\"thumbnail\">
  95.                                 ";
  96.                     // line 30
  97.                     echo twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["image"], "thumbnail", [=> "galleryThumbnail"], "method"falsefalsefalse30), "getHTML", [=> ["imgAttributes" => ["class" => "img-thumbnail img-fluid w-100"]]], "method"falsefalsefalse30);
  98.                     echo "
  99.                             </a>
  100.                         </div>
  101.                     ";
  102.                 }
  103.                 // line 36
  104.                 echo "
  105.                 ";
  106.             }
  107.             $_parent $context['_parent'];
  108.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['image'], $context['_parent'], $context['loop']);
  109.             $context array_intersect_key($context$_parent) + $_parent;
  110.             // line 38
  111.             echo "
  112.             </div>
  113.         ";
  114.         }
  115.         // line 42
  116.         echo "
  117.         ";
  118.         // line 43
  119.         if (twig_get_attribute($this->env$this->source, (isset($context["news"]) || array_key_exists("news"$context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.'43$this->source); })()), "content", [], "any"falsefalsefalse43)) {
  120.             // line 44
  121.             echo "
  122.             ";
  123.             // line 45
  124.             $context['_parent'] = $context;
  125.             $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["news"]) || array_key_exists("news"$context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.'45$this->source); })()), "content", [], "any"falsefalsefalse45), "items", [], "any"falsefalsefalse45));
  126.             $context['loop'] = [
  127.               'parent' => $context['_parent'],
  128.               'index0' => 0,
  129.               'index'  => 1,
  130.               'first'  => true,
  131.             ];
  132.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  133.                 $length count($context['_seq']);
  134.                 $context['loop']['revindex0'] = $length 1;
  135.                 $context['loop']['revindex'] = $length;
  136.                 $context['loop']['length'] = $length;
  137.                 $context['loop']['last'] = === $length;
  138.             }
  139.             foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  140.                 // line 46
  141.                 echo "
  142.                 ";
  143.                 // line 47
  144.                 $this->loadTemplate((("news/content/" twig_get_attribute($this->env$this->source$context["item"], "type", [], "any"falsefalsefalse47)) . ".html.twig"), "news/detail.html.twig"47)->display(twig_array_merge($context, ["item" => $context["item"]]));
  145.                 // line 48
  146.                 echo "
  147.             ";
  148.                 ++$context['loop']['index0'];
  149.                 ++$context['loop']['index'];
  150.                 $context['loop']['first'] = false;
  151.                 if (isset($context['loop']['length'])) {
  152.                     --$context['loop']['revindex0'];
  153.                     --$context['loop']['revindex'];
  154.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  155.                 }
  156.             }
  157.             $_parent $context['_parent'];
  158.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
  159.             $context array_intersect_key($context$_parent) + $_parent;
  160.             // line 50
  161.             echo "        ";
  162.         }
  163.         // line 51
  164.         echo "
  165.     </div>
  166. ";
  167.         
  168.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  169.         
  170.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  171.     }
  172.     public function getTemplateName()
  173.     {
  174.         return "news/detail.html.twig";
  175.     }
  176.     public function isTraitable()
  177.     {
  178.         return false;
  179.     }
  180.     public function getDebugInfo()
  181.     {
  182.         return array (  186 => 51,  183 => 50,  168 => 48,  166 => 47,  163 => 46,  146 => 45,  143 => 44,  141 => 43,  138 => 42,  132 => 38,  125 => 36,  116 => 30,  112 => 29,  107 => 26,  105 => 25,  102 => 24,  98 => 23,  93 => 20,  91 => 19,  85 => 16,  80 => 14,  74 => 11,  68 => 7,  58 => 6,  35 => 3,);
  183.     }
  184.     public function getSourceContext()
  185.     {
  186.         return new Source("{# @var news \\Pimcore\\Model\\DataObject\\News #}
  187. {% extends 'layouts/layout.html.twig' %}
  188. {% block content %}
  189.     <div id=\"main-content\" class=\"main-content mb-5\">
  190.         <div class=\"page-header\">
  191.             <h1>{{ news.title }}</h1>
  192.         </div>
  193.         <div class=\"text-muted mb-3\">{{ news.date | date('Y-m-d h:i A') }}</div>
  194.         <div class=\"display-6\">
  195.             {{ news.shortText }}
  196.         </div>
  197.         {% if news.gallery.items %}
  198.             <div class=\"row\">
  199.                 {% for image in news.gallery.items %}
  200.                     {% if image.image %}
  201.                         <div class=\"col-sm-3 mt-3\">
  202.                             <a href=\"{{ image.getThumbnail('galleryLightbox')|raw }}\" class=\"thumbnail\">
  203.                                 {{ image.thumbnail('galleryThumbnail').getHTML({imgAttributes: {class: 'img-thumbnail img-fluid w-100'}})|raw }}
  204.                             </a>
  205.                         </div>
  206.                     {% endif %}
  207.                 {% endfor %}
  208.             </div>
  209.         {% endif %}
  210.         {% if news.content %}
  211.             {% for item in news.content.items %}
  212.                 {% include 'news/content/' ~ item.type ~ '.html.twig' with {'item': item} %}
  213.             {% endfor %}
  214.         {% endif %}
  215.     </div>
  216. {% endblock %}""news/detail.html.twig""/www/htdocs/w0189996/pimcore-demo/templates/news/detail.html.twig");
  217.     }
  218. }