var/cache/dev/twig/51/5184a8a1b54d87f0e214a30548618d88.php line 125
<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* news/item.html.twig */
class __TwigTemplate_ebdf21a438c23ff158ffceea66d952ac extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'body' => [$this, 'block_body'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "layout/base.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "news/item.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "news/item.html.twig"));
$this->parent = $this->loadTemplate("layout/base.html.twig", "news/item.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 2
public function block_title($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
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", false, false, false, 2), $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("title.news.caption")), "html", null, true);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 3
public function block_body($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 4
echo " ";
// line 5
echo " <div class=\"presentation new-presentation\">
<div class=\"presentation__background-wrapper\">
<div class=\"presentation__background presentation__background-top\"
style=\"background-image: url(";
// line 8
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/header/bg.jpg"), "html", null, true);
echo ")\"></div>
";
// line 14
echo "
";
// line 17
echo " </div>
<div class=\"presentation__content container\">
<h1 class=\"presentation__title presentation__title_size_s\">";
// line 19
echo twig_escape_filter($this->env, 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.', 19, $this->source); })()), "caption", [], "any", false, false, false, 19), "html", null, true);
echo "</h1>
";
// line 20
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", false, false, false, 20)) {
// line 21
echo " <div class=\"presentation__subtitle\">";
echo twig_escape_filter($this->env, 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.', 21, $this->source); })()), "subtitle", [], "any", false, false, false, 21), "html", null, true);
echo "</div>
";
}
// line 23
echo " </div>
<div class=\"new-presentation__info\">
<div class=\"new-presentation__info-inner container\">
";
// line 26
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");
echo "
<div class=\"new-presentation__date\">";
// line 27
echo twig_escape_filter($this->env, $this->extensions['Twig\Extra\Intl\IntlExtension']->formatDate($this->env, 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.', 27, $this->source); })()), "publishAt", [], "any", false, false, false, 27), "long", "dd MMMM yyyy"), "html", null, true);
echo "</div>
</div>
</div>
</div>
<div class=\"new\">
<div class=\"new__inner container\">
<div class=\"text-block new__content\">
";
// line 34
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", false, false, false, 34);
echo "
</div>
";
// line 36
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); })())) {
// line 37
echo " <div class=\"new__other-news\">
<h4 class=\"new__other-news-title\">";
// line 38
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("news.other_news"), "html", null, true);
echo "</h4>
<div class=\"new__other-news-inner\">
";
// line 40
$context['_parent'] = $context;
$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); })()));
foreach ($context['_seq'] as $context["_key"] => $context["n"]) {
// line 41
echo " <div class=\"new__other-news-new\">
";
// line 42
if (twig_get_attribute($this->env, $this->source, $context["n"], "image", [], "any", false, false, false, 42)) {
echo "<a class=\"new__other-news-new-image image-cover\"
href=\"";
// line 43
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", false, false, false, 43)]), "html", null, true);
echo "\">
<img
src=\"";
// line 46
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", false, false, false, 46)), "news_other_preview"), "html", null, true);
echo "\"
>
</a>
";
}
// line 50
echo " <div class=\"new__other-news-new-text\"><a class=\"new__other-news-new-title\"
href=\"";
// line 51
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", false, false, false, 51)]), "html", null, true);
echo "\">
<h5>";
// line 52
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["n"], "caption", [], "any", false, false, false, 52), "html", null, true);
echo "</h5></a>
<div class=\"new__other-news-new-date\">";
// line 53
echo twig_escape_filter($this->env, $this->extensions['Twig\Extra\Intl\IntlExtension']->formatDate($this->env, twig_get_attribute($this->env, $this->source, $context["n"], "publishAt", [], "any", false, false, false, 53), "long", "dd MMMM yyyy"), "html", null, true);
echo "</div>
</div>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['n'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 57
echo " </div>
</div>
";
}
// line 60
echo " </div>
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "news/item.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{% extends 'layout/base.html.twig' %}
{% block title %}{{ title(item.caption, \"title.news.caption\"|trans) }}{% endblock %}
{% block body %}
{# @var item \\App\\Entity\\Content\\News #}
<div class=\"presentation new-presentation\">
<div class=\"presentation__background-wrapper\">
<div class=\"presentation__background presentation__background-top\"
style=\"background-image: url({{ asset('build/images/header/bg.jpg') }})\"></div>
{# <div class=\"presentation__background {% if not item.image %}presentation__background-top{% endif %}\"
style=\"background-image: url({% if item.image %}
{{ vich_uploader_asset(item.image)|imagine_filter('news_item_background') }}
{% else %}{{ asset('build/images/header/bg.jpg') }}{% endif %})\"></div>#}
{# <div class=\"presentation__background\" style=\"background-image: url({{ asset('build/images/news/6.jpg') }})\"></div> #}
</div>
<div class=\"presentation__content container\">
<h1 class=\"presentation__title presentation__title_size_s\">{{ item.caption }}</h1>
{% if item.subtitle %}
<div class=\"presentation__subtitle\">{{ item.subtitle }}</div>
{% endif %}
</div>
<div class=\"new-presentation__info\">
<div class=\"new-presentation__info-inner container\">
{{ item|owner_render('news_view') }}
<div class=\"new-presentation__date\">{{ item.publishAt|format_date('long',\"dd MMMM yyyy\") }}</div>
</div>
</div>
</div>
<div class=\"new\">
<div class=\"new__inner container\">
<div class=\"text-block new__content\">
{{ item.text|raw }}
</div>
{% if other_news %}
<div class=\"new__other-news\">
<h4 class=\"new__other-news-title\">{{ \"news.other_news\"|trans }}</h4>
<div class=\"new__other-news-inner\">
{% for n in other_news %}
<div class=\"new__other-news-new\">
{% if n.image %}<a class=\"new__other-news-new-image image-cover\"
href=\"{{ path('news_item',{id:n.id}) }}\">
<img
src=\"{{ vich_uploader_asset(n.image)|imagine_filter('news_other_preview') }}\"
>
</a>
{% endif %}
<div class=\"new__other-news-new-text\"><a class=\"new__other-news-new-title\"
href=\"{{ path('news_item',{id:n.id}) }}\">
<h5>{{ n.caption }}</h5></a>
<div class=\"new__other-news-new-date\">{{ n.publishAt|format_date('long',\"dd MMMM yyyy\") }}</div>
</div>
</div>
{% endfor %}
</div>
</div>
{% endif %}
</div>
</div>
{% endblock %}
", "news/item.html.twig", "/var/www/templates/news/item.html.twig");
}
}