var/cache/dev/twig/65/65ebff760163a9d688e22ed33c573504.php line 50

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_d8fa6ddadc78e93ba6f2045e2e0c7d70 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 3
  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/detail.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/detail.html.twig"));
  40.         $this->parent $this->loadTemplate("layouts/layout.html.twig""news/detail.html.twig"3);
  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 6
  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 7
  56.         echo "
  57.     <div id=\"main-content\" class=\"main-content mb-5\">
  58.         <div class=\"page-header\">
  59.             <h1>";
  60.         // line 11
  61.         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(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.'11$this->source); })()), "title", [], "any"falsefalsetrue11), 11$this->source), "html"nulltrue);
  62.         echo "</h1>
  63.         </div>
  64.         <div class=\"text-muted mb-3\">";
  65.         // line 14
  66.         echo twig_escape_filter($this->envtwig_date_format_filter($this->env$this->sandbox->ensureToStringAllowed(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.'14$this->source); })()), "date", [], "any"falsefalsetrue14), 14$this->source), "Y-m-d h:i A"), "html"nulltrue);
  67.         echo "</div>
  68.         <div class=\"display-6\">
  69.             ";
  70.         // line 16
  71.         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(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.'16$this->source); })()), "shortText", [], "any"falsefalsetrue16), 16$this->source), "html"nulltrue);
  72.         echo "
  73.         </div>
  74.         ";
  75.         // line 19
  76.         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"falsefalsetrue19), "items", [], "any"falsefalsetrue19)) {
  77.             // line 20
  78.             echo "
  79.             <div class=\"row\">
  80.                 ";
  81.             // line 23
  82.             $context['_parent'] = $context;
  83.             $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"falsefalsetrue23), "items", [], "any"falsefalsetrue23));
  84.             foreach ($context['_seq'] as $context["_key"] => $context["image"]) {
  85.                 // line 24
  86.                 echo "
  87.                     ";
  88.                 // line 25
  89.                 if (twig_get_attribute($this->env$this->source$context["image"], "image", [], "any"falsefalsetrue25)) {
  90.                     // line 26
  91.                     echo "
  92.                         <div class=\"col-sm-3 mt-3\">
  93.                             <a href=\"";
  94.                     // line 29
  95.                     echo $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["image"], "getThumbnail", [=> "galleryLightbox"], "method"falsefalsetrue29), 29$this->source);
  96.                     echo "\" class=\"thumbnail\">
  97.                                 ";
  98.                     // line 30
  99.                     echo $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["image"], "thumbnail", [=> "galleryThumbnail"], "method"falsefalsetrue30), "getHTML", [=> ["imgAttributes" => ["class" => "img-thumbnail img-fluid w-100"]]], "method"falsefalsetrue30), 30$this->source);
  100.                     echo "
  101.                             </a>
  102.                         </div>
  103.                     ";
  104.                 }
  105.                 // line 36
  106.                 echo "
  107.                 ";
  108.             }
  109.             $_parent $context['_parent'];
  110.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['image'], $context['_parent'], $context['loop']);
  111.             $context array_intersect_key($context$_parent) + $_parent;
  112.             // line 38
  113.             echo "
  114.             </div>
  115.         ";
  116.         }
  117.         // line 42
  118.         echo "
  119.         ";
  120.         // line 43
  121.         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"falsefalsetrue43)) {
  122.             // line 44
  123.             echo "
  124.             ";
  125.             // line 45
  126.             $context['_parent'] = $context;
  127.             $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"falsefalsetrue45), "items", [], "any"falsefalsetrue45));
  128.             $context['loop'] = [
  129.               'parent' => $context['_parent'],
  130.               'index0' => 0,
  131.               'index'  => 1,
  132.               'first'  => true,
  133.             ];
  134.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  135.                 $length count($context['_seq']);
  136.                 $context['loop']['revindex0'] = $length 1;
  137.                 $context['loop']['revindex'] = $length;
  138.                 $context['loop']['length'] = $length;
  139.                 $context['loop']['last'] = === $length;
  140.             }
  141.             foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  142.                 // line 46
  143.                 echo "
  144.                 ";
  145.                 // line 47
  146.                 $this->loadTemplate((("news/content/" twig_get_attribute($this->env$this->source$context["item"], "type", [], "any"falsefalsetrue47)) . ".html.twig"), "news/detail.html.twig"47)->display(twig_array_merge($context, ["item" => $context["item"]]));
  147.                 // line 48
  148.                 echo "
  149.             ";
  150.                 ++$context['loop']['index0'];
  151.                 ++$context['loop']['index'];
  152.                 $context['loop']['first'] = false;
  153.                 if (isset($context['loop']['length'])) {
  154.                     --$context['loop']['revindex0'];
  155.                     --$context['loop']['revindex'];
  156.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  157.                 }
  158.             }
  159.             $_parent $context['_parent'];
  160.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
  161.             $context array_intersect_key($context$_parent) + $_parent;
  162.             // line 50
  163.             echo "        ";
  164.         }
  165.         // line 51
  166.         echo "
  167.     </div>
  168. ";
  169.         
  170.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  171.         
  172.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  173.     }
  174.     public function getTemplateName()
  175.     {
  176.         return "news/detail.html.twig";
  177.     }
  178.     public function isTraitable()
  179.     {
  180.         return false;
  181.     }
  182.     public function getDebugInfo()
  183.     {
  184.         return array (  188 => 51,  185 => 50,  170 => 48,  168 => 47,  165 => 46,  148 => 45,  145 => 44,  143 => 43,  140 => 42,  134 => 38,  127 => 36,  118 => 30,  114 => 29,  109 => 26,  107 => 25,  104 => 24,  100 => 23,  95 => 20,  93 => 19,  87 => 16,  82 => 14,  76 => 11,  70 => 7,  60 => 6,  37 => 3,);
  185.     }
  186.     public function getSourceContext()
  187.     {
  188.         return new Source("{# @var news \\Pimcore\\Model\\DataObject\\News #}
  189. {% extends 'layouts/layout.html.twig' %}
  190. {% block content %}
  191.     <div id=\"main-content\" class=\"main-content mb-5\">
  192.         <div class=\"page-header\">
  193.             <h1>{{ news.title }}</h1>
  194.         </div>
  195.         <div class=\"text-muted mb-3\">{{ news.date | date('Y-m-d h:i A') }}</div>
  196.         <div class=\"display-6\">
  197.             {{ news.shortText }}
  198.         </div>
  199.         {% if news.gallery.items %}
  200.             <div class=\"row\">
  201.                 {% for image in news.gallery.items %}
  202.                     {% if image.image %}
  203.                         <div class=\"col-sm-3 mt-3\">
  204.                             <a href=\"{{ image.getThumbnail('galleryLightbox')|raw }}\" class=\"thumbnail\">
  205.                                 {{ image.thumbnail('galleryThumbnail').getHTML({imgAttributes: {class: 'img-thumbnail img-fluid w-100'}})|raw }}
  206.                             </a>
  207.                         </div>
  208.                     {% endif %}
  209.                 {% endfor %}
  210.             </div>
  211.         {% endif %}
  212.         {% if news.content %}
  213.             {% for item in news.content.items %}
  214.                 {% include 'news/content/' ~ item.type ~ '.html.twig' with {'item': item} %}
  215.             {% endfor %}
  216.         {% endif %}
  217.     </div>
  218. {% endblock %}""news/detail.html.twig""/var/www/www-data/data/www/pimcore.dev2.nowmedia.ru/templates/news/detail.html.twig");
  219.     }
  220.     
  221.     public function checkSecurity()
  222.     {
  223.         static $tags = array("if" => 19"for" => 23"include" => 47);
  224.         static $filters = array("escape" => 11"date" => 14"raw" => 29);
  225.         static $functions = array();
  226.         try {
  227.             $this->sandbox->checkSecurity(
  228.                 ['if''for''include'],
  229.                 ['escape''date''raw'],
  230.                 []
  231.             );
  232.         } catch (SecurityError $e) {
  233.             $e->setSourceContext($this->source);
  234.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  235.                 $e->setTemplateLine($tags[$e->getTagName()]);
  236.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  237.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  238.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  239.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  240.             }
  241.             throw $e;
  242.         }
  243.     }
  244. }