var/cache/dev/twig/59/594dddd53d98a58b38c9ec68bbf1141d.php line 40

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/listing.html.twig */
  14. class __TwigTemplate_30c265ba8e27319166d7fb9028ebd11a 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.         $this->sandbox $this->env->getExtension('\Twig\Extension\SandboxExtension');
  26.         $this->checkSecurity();
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 1
  31.         return "layouts/layout.html.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""news/listing.html.twig"));
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""news/listing.html.twig"));
  40.         $this->parent $this->loadTemplate("layouts/layout.html.twig""news/listing.html.twig"1);
  41.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  42.         
  43.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  44.         
  45.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  46.     }
  47.     // line 4
  48.     public function block_content($context, array $blocks = [])
  49.     {
  50.         $macros $this->macros;
  51.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  52.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  53.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  54.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  55.         // line 5
  56.         echo "
  57.     <div id=\"main-content\" class=\"main-content\">
  58.         ";
  59.         // line 8
  60.         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.'8$this->source); })()), "getTitle", [], "method"falsefalsetrue8))) {
  61.             // line 9
  62.             echo "            ";
  63.             $this->env->getFunction('pimcore_head_title')->getCallable()(twig_get_attribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"input""headline"), "getData", [], "method"falsefalsetrue9), "PREPEND");
  64.             // line 10
  65.             echo "        ";
  66.         }
  67.         // line 11
  68.         echo "
  69.         <div class=\"page-header\">
  70.             <h1>";
  71.         // line 13
  72.         echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"input""headline", ["placeholder" => "Headline"]);
  73.         echo "</h1>
  74.         </div>
  75.         ";
  76.         // line 16
  77.         echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"areablock""content", ["allowed" => ["headlines""hero-teaser""horizontal-line""wysiwyg"]]);
  78.         // line 25
  79.         echo "
  80.         <div class=\"row\">
  81.             <ul class=\"list-unstyled\">
  82.                 ";
  83.         // line 29
  84.         $context['_parent'] = $context;
  85.         $context['_seq'] = twig_ensure_traversable($context["news"]);
  86.         foreach ($context['_seq'] as $context["_key"] => $context["news"]) {
  87.             // line 30
  88.             echo "                    ";
  89.             // line 31
  90.             echo "                    ";
  91.             $context["detailLink"] = $this->extensions['App\Twig\Extension\NewsExtension']->generateLink($this->sandbox->ensureToStringAllowed($context["news"], 31$this->source));
  92.             // line 32
  93.             echo "
  94.                     <li class=\"media my-3\">
  95.                         ";
  96.             // line 34
  97.             if (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["news"], "gallery", [], "any"falsefalsetrue34), "items", [], "any"falsefalsetrue34)) {
  98.                 // line 35
  99.                 echo "                            ";
  100.                 $context["image"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["news"], "gallery", [], "any"falsefalsetrue35), "current", [], "any"falsefalsetrue35);
  101.                 // line 36
  102.                 echo "
  103.                             ";
  104.                 // line 37
  105.                 if (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.'37$this->source); })()), "image", [], "any"falsefalsetrue37)) {
  106.                     // line 38
  107.                     echo "                                <a href=\"";
  108.                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["detailLink"]) || array_key_exists("detailLink"$context) ? $context["detailLink"] : (function () { throw new RuntimeError('Variable "detailLink" does not exist.'38$this->source); })()), 38$this->source), "html"nulltrue);
  109.                     echo "\">
  110.                                     ";
  111.                     // line 39
  112.                     echo $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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.'39$this->source); })()), "image", [], "any"falsefalsetrue39), "thumbnail", ["newsList"], "method"falsefalsetrue39), "html", [["imgAttributes" => ["class" => "mr-3"]]], "method"falsefalsetrue39), 39$this->source);
  113.                     echo "
  114.                                 </a>
  115.                             ";
  116.                 }
  117.                 // line 42
  118.                 echo "                        ";
  119.             }
  120.             // line 43
  121.             echo "
  122.                         <div class=\"media-body\">
  123.                             <h5 class=\"mt-0\">
  124.                                 <a href=\"";
  125.             // line 46
  126.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["detailLink"]) || array_key_exists("detailLink"$context) ? $context["detailLink"] : (function () { throw new RuntimeError('Variable "detailLink" does not exist.'46$this->source); })()), 46$this->source), "html"nulltrue);
  127.             echo "\" class=\"text-decoration-none text-dark\">
  128.                                     ";
  129.             // line 47
  130.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["news"], "title", [], "any"falsefalsetrue47), 47$this->source), "html"nulltrue);
  131.             echo "
  132.                                 </a>
  133.                             </h5>
  134.                             ";
  135.             // line 50
  136.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["news"], "shortText", [], "any"falsefalsetrue50), 50$this->source), "html"nulltrue);
  137.             echo "
  138.                         </div>
  139.                     </li>
  140.                 ";
  141.         }
  142.         $_parent $context['_parent'];
  143.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['news'], $context['_parent'], $context['loop']);
  144.         $context array_intersect_key($context$_parent) + $_parent;
  145.         // line 54
  146.         echo "            </ul>
  147.         </div>
  148.         <div class=\"pt-5\">
  149.             ";
  150.         // line 59
  151.         $this->loadTemplate("includes/pagination.html.twig""news/listing.html.twig"59)->display($context);
  152.         // line 60
  153.         echo "
  154.         </div>
  155.     </div>
  156. ";
  157.         
  158.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  159.         
  160.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  161.     }
  162.     /**
  163.      * @codeCoverageIgnore
  164.      */
  165.     public function getTemplateName()
  166.     {
  167.         return "news/listing.html.twig";
  168.     }
  169.     /**
  170.      * @codeCoverageIgnore
  171.      */
  172.     public function isTraitable()
  173.     {
  174.         return false;
  175.     }
  176.     /**
  177.      * @codeCoverageIgnore
  178.      */
  179.     public function getDebugInfo()
  180.     {
  181.         return array (  172 => 60,  170 => 59,  163 => 54,  153 => 50,  147 => 47,  143 => 46,  138 => 43,  135 => 42,  129 => 39,  124 => 38,  122 => 37,  119 => 36,  116 => 35,  114 => 34,  110 => 32,  107 => 31,  105 => 30,  101 => 29,  95 => 25,  93 => 16,  87 => 13,  83 => 11,  80 => 10,  77 => 9,  75 => 8,  70 => 5,  60 => 4,  37 => 1,);
  182.     }
  183.     public function getSourceContext()
  184.     {
  185.         return new Source("{% extends 'layouts/layout.html.twig' %}
  186. {% block content %}
  187.     <div id=\"main-content\" class=\"main-content\">
  188.         {% if document.getTitle() is empty %}
  189.             {% do pimcore_head_title(pimcore_input('headline').getData(), 'PREPEND') %}
  190.         {% endif %}
  191.         <div class=\"page-header\">
  192.             <h1>{{ pimcore_input('headline', {'placeholder':'Headline'}) }}</h1>
  193.         </div>
  194.         {{
  195.             pimcore_areablock('content', {
  196.                 'allowed': [
  197.                     'headlines',
  198.                     'hero-teaser',
  199.                     'horizontal-line',
  200.                     'wysiwyg'
  201.                 ]
  202.             })
  203.         }}
  204.         <div class=\"row\">
  205.             <ul class=\"list-unstyled\">
  206.                 {%  for news in news %}
  207.                     {# @var news \\Pimcore\\Model\\DataObject\\News #}
  208.                     {% set detailLink = app_news_detaillink(news) %}
  209.                     <li class=\"media my-3\">
  210.                         {% if news.gallery.items %}
  211.                             {% set image = news.gallery.current %}
  212.                             {% if image.image %}
  213.                                 <a href=\"{{ detailLink }}\">
  214.                                     {{ image.image.thumbnail('newsList').html({imgAttributes: {class: 'mr-3'}}) | raw }}
  215.                                 </a>
  216.                             {% endif %}
  217.                         {% endif %}
  218.                         <div class=\"media-body\">
  219.                             <h5 class=\"mt-0\">
  220.                                 <a href=\"{{ detailLink }}\" class=\"text-decoration-none text-dark\">
  221.                                     {{ news.title }}
  222.                                 </a>
  223.                             </h5>
  224.                             {{ news.shortText }}
  225.                         </div>
  226.                     </li>
  227.                 {% endfor %}
  228.             </ul>
  229.         </div>
  230.         <div class=\"pt-5\">
  231.             {% include 'includes/pagination.html.twig' %}
  232.         </div>
  233.     </div>
  234. {%  endblock %}
  235. ""news/listing.html.twig""/var/www/dev-10/templates/news/listing.html.twig");
  236.     }
  237.     
  238.     public function checkSecurity()
  239.     {
  240.         static $tags = array("if" => 8"do" => 9"for" => 29"set" => 31"include" => 59);
  241.         static $filters = array("escape" => 38"raw" => 39);
  242.         static $functions = array("pimcore_head_title" => 9"pimcore_input" => 9"pimcore_areablock" => 17"app_news_detaillink" => 31);
  243.         try {
  244.             $this->sandbox->checkSecurity(
  245.                 ['if''do''for''set''include'],
  246.                 ['escape''raw'],
  247.                 ['pimcore_head_title''pimcore_input''pimcore_areablock''app_news_detaillink']
  248.             );
  249.         } catch (SecurityError $e) {
  250.             $e->setSourceContext($this->source);
  251.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  252.                 $e->setTemplateLine($tags[$e->getTagName()]);
  253.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  254.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  255.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  256.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  257.             }
  258.             throw $e;
  259.         }
  260.     }
  261. }