var/cache/dev/twig/40/404fe35f4c1073f854007af29b81b6a3.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. /* VisualMediaNewsBundle/views/News/index.html.twig */
  14. class __TwigTemplate_b54967225116b38d1daad50f7618a679 extends \Twig\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. 'main' => [$this, 'block_main'],
  24. ];
  25. }
  26. protected function doGetParent(array $context)
  27. {
  28. // line 1
  29. return "Layout/base.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", "VisualMediaNewsBundle/views/News/index.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", "VisualMediaNewsBundle/views/News/index.html.twig"));
  38. $this->parent = $this->loadTemplate("Layout/base.html.twig", "VisualMediaNewsBundle/views/News/index.html.twig", 1);
  39. $this->parent->display($context, array_merge($this->blocks, $blocks));
  40. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  41. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  42. }
  43. // line 3
  44. public function block_main($context, array $blocks = [])
  45. {
  46. $macros = $this->macros;
  47. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  48. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
  49. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  50. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
  51. // line 4
  52. echo " <section class=\"container\">
  53. ";
  54. // line 5
  55. $this->loadTemplate("@VisualMediaBreadcrumb/Breadcrumb/breadcrumb.html.twig", "VisualMediaNewsBundle/views/News/index.html.twig", 5)->display($context);
  56. // line 6
  57. echo "
  58. <div class=\"row \">
  59. ";
  60. // line 8
  61. $context["year"] = twig_date_format_filter($this->env, "now +1 year", "Y");
  62. // line 9
  63. echo "
  64. ";
  65. // line 10
  66. $context['_parent'] = $context;
  67. $context['_seq'] = twig_ensure_traversable((isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 10, $this->source); })()));
  68. foreach ($context['_seq'] as $context["_key"] => $context["newsItem"]) {
  69. // line 11
  70. echo " <div class=\"col-12 col-md-6 col-lg-4\">
  71. <article class=\"news-item equal-height\">
  72. <figure class=\"\">
  73. <a href=\"";
  74. // line 14
  75. echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("news_view", ["slug" => twig_get_attribute($this->env, $this->source, $context["newsItem"], "slug", [], "any", false, false, false, 14)]), "html", null, true);
  76. echo "\">
  77. <img src=\"";
  78. // line 15
  79. echo twig_escape_filter($this->env, $this->extensions['VisualMedia\LisaBundle\Twig\TwigUploadUrl']->url(twig_get_attribute($this->env, $this->source, $context["newsItem"], "upload", [], "any", false, false, false, 15)), "html", null, true);
  80. echo "\" alt=\"";
  81. echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["newsItem"], "title", [], "any", false, false, false, 15), "html", null, true);
  82. echo "\" style=\"width: 100%; height: 300px; object-fit: cover;\" class=\"img-responsive\">
  83. </a>
  84. </figure>
  85. <div class=\"news-item-content\">
  86. <h3 class=\"news-item-title\"><a href=\"";
  87. // line 20
  88. echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("news");
  89. echo "\">";
  90. echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["newsItem"], "title", [], "any", false, false, false, 20), "html", null, true);
  91. echo "</a></h3>
  92. <time class=\"smallest meta\" datetime=\"";
  93. // line 21
  94. echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["newsItem"], "publicationDate", [], "any", false, false, false, 21), "Y-m-d H:i"), "html", null, true);
  95. echo "\">
  96. <span class=\"text-light\">";
  97. // line 22
  98. echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("news.published_at", [], "frontend"), "html", null, true);
  99. echo " </span>
  100. ";
  101. // line 23
  102. echo twig_escape_filter($this->env, twig_localized_date_filter($this->env, twig_get_attribute($this->env, $this->source, $context["newsItem"], "publicationDate", [], "any", false, false, false, 23), "long", "none", twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 23, $this->source); })()), "request", [], "any", false, false, false, 23), "locale", [], "any", false, false, false, 23)), "html", null, true);
  103. echo "
  104. </time>
  105. <div class=\"clearfix\"></div>
  106. <p itemprop=\"description\"> ";
  107. // line 28
  108. echo twig_escape_filter($this->env, $this->extensions['VisualMedia\LisaBundle\Twig\TwigContentScan']->scan(twig_get_attribute($this->env, $this->source, $context["newsItem"], "introHtmlContent", [], "any", false, false, false, 28)), "html", null, true);
  109. echo "</p>
  110. </div>
  111. <a href=\"";
  112. // line 31
  113. echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("news_view", ["slug" => twig_get_attribute($this->env, $this->source, $context["newsItem"], "slug", [], "any", false, false, false, 31)]), "html", null, true);
  114. echo "\" class=\"btn btn-primary\">";
  115. echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("news.index.read_more", [], "frontend"), "html", null, true);
  116. echo "&nbsp;<i class=\"fas fa-chevron-right\"></i></a>
  117. </article>
  118. </div>
  119. ";
  120. }
  121. $_parent = $context['_parent'];
  122. unset($context['_seq'], $context['_iterated'], $context['_key'], $context['newsItem'], $context['_parent'], $context['loop']);
  123. $context = array_intersect_key($context, $_parent) + $_parent;
  124. // line 35
  125. echo " </div>
  126. </section>
  127. ";
  128. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  129. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  130. }
  131. public function getTemplateName()
  132. {
  133. return "VisualMediaNewsBundle/views/News/index.html.twig";
  134. }
  135. public function isTraitable()
  136. {
  137. return false;
  138. }
  139. public function getDebugInfo()
  140. {
  141. return array ( 145 => 35, 133 => 31, 127 => 28, 119 => 23, 115 => 22, 111 => 21, 105 => 20, 95 => 15, 91 => 14, 86 => 11, 82 => 10, 79 => 9, 77 => 8, 73 => 6, 71 => 5, 68 => 4, 58 => 3, 35 => 1,);
  142. }
  143. public function getSourceContext()
  144. {
  145. return new Source("{% extends 'Layout/base.html.twig' %}
  146. {% block main %}
  147. <section class=\"container\">
  148. {% include '@VisualMediaBreadcrumb/Breadcrumb/breadcrumb.html.twig' %}
  149. <div class=\"row \">
  150. {% set year = 'now +1 year'|date('Y') %}
  151. {% for newsItem in news %}
  152. <div class=\"col-12 col-md-6 col-lg-4\">
  153. <article class=\"news-item equal-height\">
  154. <figure class=\"\">
  155. <a href=\"{{ path('news_view', { slug : newsItem.slug}) }}\">
  156. <img src=\"{{ newsItem.upload|url }}\" alt=\"{{ newsItem.title }}\" style=\"width: 100%; height: 300px; object-fit: cover;\" class=\"img-responsive\">
  157. </a>
  158. </figure>
  159. <div class=\"news-item-content\">
  160. <h3 class=\"news-item-title\"><a href=\"{{ path('news') }}\">{{ newsItem.title }}</a></h3>
  161. <time class=\"smallest meta\" datetime=\"{{ newsItem.publicationDate|date(\"Y-m-d H:i\") }}\">
  162. <span class=\"text-light\">{{ 'news.published_at'|trans({}, 'frontend') }} </span>
  163. {{ newsItem.publicationDate|localizeddate('long', 'none', app.request.locale ) }}
  164. </time>
  165. <div class=\"clearfix\"></div>
  166. <p itemprop=\"description\"> {{ newsItem.introHtmlContent|scan }}</p>
  167. </div>
  168. <a href=\"{{ path('news_view', { slug : newsItem.slug}) }}\" class=\"btn btn-primary\">{{ 'news.index.read_more'|trans({}, 'frontend') }}&nbsp;<i class=\"fas fa-chevron-right\"></i></a>
  169. </article>
  170. </div>
  171. {% endfor %}
  172. </div>
  173. </section>
  174. {% endblock %}
  175. ", "VisualMediaNewsBundle/views/News/index.html.twig", "/var/www/public_html/templates/VisualMediaNewsBundle/views/News/index.html.twig");
  176. }
  177. }