var/cache/dev/twig/51/5184a8a1b54d87f0e214a30548618d88.php line 49

  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/item.html.twig */
  14. class __TwigTemplate_ebdf21a438c23ff158ffceea66d952ac 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.             'title' => [$this'block_title'],
  24.             'body' => [$this'block_body'],
  25.         ];
  26.     }
  27.     protected function doGetParent(array $context)
  28.     {
  29.         // line 1
  30.         return "layout/base.html.twig";
  31.     }
  32.     protected function doDisplay(array $context, array $blocks = [])
  33.     {
  34.         $macros $this->macros;
  35.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""news/item.html.twig"));
  37.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""news/item.html.twig"));
  39.         $this->parent $this->loadTemplate("layout/base.html.twig""news/item.html.twig"1);
  40.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  41.         
  42.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  43.         
  44.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  45.     }
  46.     // line 2
  47.     public function block_title($context, array $blocks = [])
  48.     {
  49.         $macros $this->macros;
  50.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  51.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  52.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  53.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  54.         echo twig_escape_filter($this->env$this->extensions['App\Service\Twig\TextHelpers']->title(twig_get_attribute($this->env$this->source, (isset($context["item"]) || array_key_exists("item"$context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.'2$this->source); })()), "caption", [], "any"falsefalsefalse2), $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("title.news.caption")), "html"nulltrue);
  55.         
  56.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  57.         
  58.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  59.     }
  60.     // line 3
  61.     public function block_body($context, array $blocks = [])
  62.     {
  63.         $macros $this->macros;
  64.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  65.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  66.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  67.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  68.         // line 4
  69.         echo "    ";
  70.         // line 5
  71.         echo "    <div class=\"presentation new-presentation\">
  72.         <div class=\"presentation__background-wrapper\">
  73.             <div class=\"presentation__background  presentation__background-top\"
  74.                  style=\"background-image: url(";
  75.         // line 8
  76.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/header/bg.jpg"), "html"nulltrue);
  77.         echo ")\"></div>
  78. ";
  79.         // line 14
  80.         echo "
  81.             ";
  82.         // line 17
  83.         echo "        </div>
  84.         <div class=\"presentation__content container\">
  85.             <h1 class=\"presentation__title presentation__title_size_s\">";
  86.         // line 19
  87.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["item"]) || array_key_exists("item"$context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.'19$this->source); })()), "caption", [], "any"falsefalsefalse19), "html"nulltrue);
  88.         echo "</h1>
  89.             ";
  90.         // line 20
  91.         if (twig_get_attribute($this->env$this->source, (isset($context["item"]) || array_key_exists("item"$context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.'20$this->source); })()), "subtitle", [], "any"falsefalsefalse20)) {
  92.             // line 21
  93.             echo "                <div class=\"presentation__subtitle\">";
  94.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["item"]) || array_key_exists("item"$context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.'21$this->source); })()), "subtitle", [], "any"falsefalsefalse21), "html"nulltrue);
  95.             echo "</div>
  96.             ";
  97.         }
  98.         // line 23
  99.         echo "        </div>
  100.         <div class=\"new-presentation__info\">
  101.             <div class=\"new-presentation__info-inner container\">
  102.                 ";
  103.         // line 26
  104.         echo $this->extensions['App\Service\Common\Owner\TwigFunctions']->owner_render((isset($context["item"]) || array_key_exists("item"$context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.'26$this->source); })()), "news_view");
  105.         echo "
  106.                 <div class=\"new-presentation__date\">";
  107.         // line 27
  108.         echo twig_escape_filter($this->env$this->extensions['Twig\Extra\Intl\IntlExtension']->formatDate($this->envtwig_get_attribute($this->env$this->source, (isset($context["item"]) || array_key_exists("item"$context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.'27$this->source); })()), "publishAt", [], "any"falsefalsefalse27), "long""dd MMMM yyyy"), "html"nulltrue);
  109.         echo "</div>
  110.             </div>
  111.         </div>
  112.     </div>
  113.     <div class=\"new\">
  114.         <div class=\"new__inner container\">
  115.             <div class=\"text-block new__content\">
  116.                 ";
  117.         // line 34
  118.         echo twig_get_attribute($this->env$this->source, (isset($context["item"]) || array_key_exists("item"$context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.'34$this->source); })()), "text", [], "any"falsefalsefalse34);
  119.         echo "
  120.             </div>
  121.             ";
  122.         // line 36
  123.         if ((isset($context["other_news"]) || array_key_exists("other_news"$context) ? $context["other_news"] : (function () { throw new RuntimeError('Variable "other_news" does not exist.'36$this->source); })())) {
  124.             // line 37
  125.             echo "                <div class=\"new__other-news\">
  126.                     <h4 class=\"new__other-news-title\">";
  127.             // line 38
  128.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("news.other_news"), "html"nulltrue);
  129.             echo "</h4>
  130.                     <div class=\"new__other-news-inner\">
  131.                         ";
  132.             // line 40
  133.             $context['_parent'] = $context;
  134.             $context['_seq'] = twig_ensure_traversable((isset($context["other_news"]) || array_key_exists("other_news"$context) ? $context["other_news"] : (function () { throw new RuntimeError('Variable "other_news" does not exist.'40$this->source); })()));
  135.             foreach ($context['_seq'] as $context["_key"] => $context["n"]) {
  136.                 // line 41
  137.                 echo "                            <div class=\"new__other-news-new\">
  138.                                 ";
  139.                 // line 42
  140.                 if (twig_get_attribute($this->env$this->source$context["n"], "image", [], "any"falsefalsefalse42)) {
  141.                     echo "<a class=\"new__other-news-new-image image-cover\"
  142.                                                    href=\"";
  143.                     // line 43
  144.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("news_item", ["id" => twig_get_attribute($this->env$this->source$context["n"], "id", [], "any"falsefalsefalse43)]), "html"nulltrue);
  145.                     echo "\">
  146.                                     <img
  147.                                             src=\"";
  148.                     // line 46
  149.                     echo twig_escape_filter($this->env$this->env->getRuntime('Liip\ImagineBundle\Templating\LazyFilterRuntime')->filter($this->env->getRuntime('Vich\UploaderBundle\Twig\Extension\UploaderExtensionRuntime')->asset(twig_get_attribute($this->env$this->source$context["n"], "image", [], "any"falsefalsefalse46)), "news_other_preview"), "html"nulltrue);
  150.                     echo "\"
  151.                                     >
  152.                                     </a>
  153.                                 ";
  154.                 }
  155.                 // line 50
  156.                 echo "                                <div class=\"new__other-news-new-text\"><a class=\"new__other-news-new-title\"
  157.                                                                          href=\"";
  158.                 // line 51
  159.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("news_item", ["id" => twig_get_attribute($this->env$this->source$context["n"], "id", [], "any"falsefalsefalse51)]), "html"nulltrue);
  160.                 echo "\">
  161.                                         <h5>";
  162.                 // line 52
  163.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["n"], "caption", [], "any"falsefalsefalse52), "html"nulltrue);
  164.                 echo "</h5></a>
  165.                                     <div class=\"new__other-news-new-date\">";
  166.                 // line 53
  167.                 echo twig_escape_filter($this->env$this->extensions['Twig\Extra\Intl\IntlExtension']->formatDate($this->envtwig_get_attribute($this->env$this->source$context["n"], "publishAt", [], "any"falsefalsefalse53), "long""dd MMMM yyyy"), "html"nulltrue);
  168.                 echo "</div>
  169.                                 </div>
  170.                             </div>
  171.                         ";
  172.             }
  173.             $_parent $context['_parent'];
  174.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['n'], $context['_parent'], $context['loop']);
  175.             $context array_intersect_key($context$_parent) + $_parent;
  176.             // line 57
  177.             echo "                    </div>
  178.                 </div>
  179.             ";
  180.         }
  181.         // line 60
  182.         echo "        </div>
  183.     </div>
  184. ";
  185.         
  186.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  187.         
  188.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  189.     }
  190.     public function getTemplateName()
  191.     {
  192.         return "news/item.html.twig";
  193.     }
  194.     public function isTraitable()
  195.     {
  196.         return false;
  197.     }
  198.     public function getDebugInfo()
  199.     {
  200.         return array (  204 => 60,  199 => 57,  189 => 53,  185 => 52,  181 => 51,  178 => 50,  171 => 46,  165 => 43,  161 => 42,  158 => 41,  154 => 40,  149 => 38,  146 => 37,  144 => 36,  139 => 34,  129 => 27,  125 => 26,  120 => 23,  114 => 21,  112 => 20,  108 => 19,  104 => 17,  100 => 14,  95 => 8,  90 => 5,  88 => 4,  78 => 3,  59 => 2,  36 => 1,);
  201.     }
  202.     public function getSourceContext()
  203.     {
  204.         return new Source("{% extends 'layout/base.html.twig' %}
  205. {% block title %}{{ title(item.caption, \"title.news.caption\"|trans) }}{% endblock %}
  206. {% block body %}
  207.     {# @var item  \\App\\Entity\\Content\\News #}
  208.     <div class=\"presentation new-presentation\">
  209.         <div class=\"presentation__background-wrapper\">
  210.             <div class=\"presentation__background  presentation__background-top\"
  211.                  style=\"background-image: url({{ asset('build/images/header/bg.jpg') }})\"></div>
  212. {#            <div class=\"presentation__background  {% if not item.image %}presentation__background-top{% endif %}\"
  213.                  style=\"background-image: url({% if item.image %}
  214.                      {{ vich_uploader_asset(item.image)|imagine_filter('news_item_background') }}
  215.                  {% else %}{{ asset('build/images/header/bg.jpg') }}{% endif %})\"></div>#}
  216.             {# <div class=\"presentation__background\"                 style=\"background-image: url({{ asset('build/images/news/6.jpg') }})\"></div> #}
  217.         </div>
  218.         <div class=\"presentation__content container\">
  219.             <h1 class=\"presentation__title presentation__title_size_s\">{{ item.caption }}</h1>
  220.             {% if item.subtitle %}
  221.                 <div class=\"presentation__subtitle\">{{ item.subtitle }}</div>
  222.             {% endif %}
  223.         </div>
  224.         <div class=\"new-presentation__info\">
  225.             <div class=\"new-presentation__info-inner container\">
  226.                 {{ item|owner_render('news_view') }}
  227.                 <div class=\"new-presentation__date\">{{ item.publishAt|format_date('long',\"dd MMMM yyyy\") }}</div>
  228.             </div>
  229.         </div>
  230.     </div>
  231.     <div class=\"new\">
  232.         <div class=\"new__inner container\">
  233.             <div class=\"text-block new__content\">
  234.                 {{ item.text|raw }}
  235.             </div>
  236.             {% if other_news %}
  237.                 <div class=\"new__other-news\">
  238.                     <h4 class=\"new__other-news-title\">{{ \"news.other_news\"|trans }}</h4>
  239.                     <div class=\"new__other-news-inner\">
  240.                         {% for n in other_news %}
  241.                             <div class=\"new__other-news-new\">
  242.                                 {% if n.image %}<a class=\"new__other-news-new-image image-cover\"
  243.                                                    href=\"{{ path('news_item',{id:n.id}) }}\">
  244.                                     <img
  245.                                             src=\"{{ vich_uploader_asset(n.image)|imagine_filter('news_other_preview') }}\"
  246.                                     >
  247.                                     </a>
  248.                                 {% endif %}
  249.                                 <div class=\"new__other-news-new-text\"><a class=\"new__other-news-new-title\"
  250.                                                                          href=\"{{ path('news_item',{id:n.id}) }}\">
  251.                                         <h5>{{ n.caption }}</h5></a>
  252.                                     <div class=\"new__other-news-new-date\">{{ n.publishAt|format_date('long',\"dd MMMM yyyy\") }}</div>
  253.                                 </div>
  254.                             </div>
  255.                         {% endfor %}
  256.                     </div>
  257.                 </div>
  258.             {% endif %}
  259.         </div>
  260.     </div>
  261. {% endblock %}
  262. ""news/item.html.twig""/var/www/templates/news/item.html.twig");
  263.     }
  264. }