var/cache/dev/twig/84/8440fbf97a1fbe533543d7916da22559.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. /* VisualMediaBlogBundle/views/Blog/blog_index.html.twig */
  14. class __TwigTemplate_f36bdc2d81b6378db0ee4a917b071141 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", "VisualMediaBlogBundle/views/Blog/blog_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", "VisualMediaBlogBundle/views/Blog/blog_index.html.twig"));
  38. $this->parent = $this->loadTemplate("Layout/base.html.twig", "VisualMediaBlogBundle/views/Blog/blog_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 " ";
  53. $this->loadTemplate("@VisualMediaVisual/Visual/visual.html.twig", "VisualMediaBlogBundle/views/Blog/blog_index.html.twig", 4)->display(twig_array_merge($context, ["visuals" => twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 4, $this->source); })()), "visuals", [], "any", false, false, false, 4)]));
  54. // line 5
  55. echo "
  56. <div id=\"blog_index\" class=\"container\">
  57. ";
  58. // line 7
  59. $this->loadTemplate("@VisualMediaBreadcrumb/Breadcrumb/breadcrumb_static.html.twig", "VisualMediaBlogBundle/views/Blog/blog_index.html.twig", 7)->display(twig_to_array(["breadcrumbs" => [0 => ["title" => twig_get_attribute($this->env, $this->source, // line 8
  60. (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 8, $this->source); })()), "title", [], "any", false, false, false, 8)]]]));
  61. // line 10
  62. echo "
  63. <h1>";
  64. // line 11
  65. echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 11, $this->source); })()), "title", [], "any", false, false, false, 11), "html", null, true);
  66. echo "</h1>
  67. ";
  68. // line 12
  69. echo twig_escape_filter($this->env, $this->extensions['VisualMedia\LisaBundle\Twig\TwigContentScan']->scan(twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 12, $this->source); })()), "htmlContent", [], "any", false, false, false, 12)), "html", null, true);
  70. echo "
  71. <hr>
  72. ";
  73. // line 15
  74. if ( !twig_test_empty((isset($context["categories"]) || array_key_exists("categories", $context) ? $context["categories"] : (function () { throw new RuntimeError('Variable "categories" does not exist.', 15, $this->source); })()))) {
  75. // line 16
  76. echo " <div class=\"row\">
  77. ";
  78. // line 17
  79. $context['_parent'] = $context;
  80. $context['_seq'] = twig_ensure_traversable((isset($context["categories"]) || array_key_exists("categories", $context) ? $context["categories"] : (function () { throw new RuntimeError('Variable "categories" does not exist.', 17, $this->source); })()));
  81. foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
  82. // line 18
  83. echo " <div class=\"col-4 mb-4\">
  84. <h2><a href=\"";
  85. // line 19
  86. echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("blog_category", ["categorySlug" => twig_get_attribute($this->env, $this->source, $context["category"], "slug", [], "any", false, false, false, 19)]), "html", null, true);
  87. echo "\">";
  88. echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "title", [], "any", false, false, false, 19), "html", null, true);
  89. echo "</a></h2>
  90. <span>Aantal berichten: ";
  91. // line 21
  92. echo twig_escape_filter($this->env, twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "getPosts", [], "method", false, false, false, 21)), "html", null, true);
  93. echo "</span>
  94. <div class=\"intro-text\">
  95. ";
  96. // line 24
  97. $context["max"] = 150;
  98. // line 25
  99. echo " ";
  100. $context["content"] = $this->extensions['VisualMedia\LisaBundle\Twig\TwigContentScan']->scan(twig_get_attribute($this->env, $this->source, $context["category"], "htmlContent", [], "any", false, false, false, 25));
  101. // line 26
  102. echo " ";
  103. echo (((twig_length_filter($this->env, (isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 26, $this->source); })())) > (isset($context["max"]) || array_key_exists("max", $context) ? $context["max"] : (function () { throw new RuntimeError('Variable "max" does not exist.', 26, $this->source); })()))) ? ((twig_slice($this->env, (isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 26, $this->source); })()), 0, (isset($context["max"]) || array_key_exists("max", $context) ? $context["max"] : (function () { throw new RuntimeError('Variable "max" does not exist.', 26, $this->source); })())) . "...")) : ((isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 26, $this->source); })())));
  104. echo "
  105. </div>
  106. <a href=\"";
  107. // line 29
  108. echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("blog_category", ["categorySlug" => twig_get_attribute($this->env, $this->source, $context["category"], "slug", [], "any", false, false, false, 29)]), "html", null, true);
  109. echo "\">
  110. <img src=\"";
  111. // line 30
  112. echo twig_escape_filter($this->env, $this->extensions['VisualMedia\LisaBundle\Twig\TwigUploadUrl']->url(twig_get_attribute($this->env, $this->source, $context["category"], "upload", [], "any", false, false, false, 30)), "html", null, true);
  113. echo "\" style=\"width: 100%; height: 250px; object-fit: cover;\">
  114. </a>
  115. </div>
  116. ";
  117. }
  118. $_parent = $context['_parent'];
  119. unset($context['_seq'], $context['_iterated'], $context['_key'], $context['category'], $context['_parent'], $context['loop']);
  120. $context = array_intersect_key($context, $_parent) + $_parent;
  121. // line 34
  122. echo " </div>
  123. ";
  124. } else {
  125. // line 36
  126. echo " <p>Er zijn geen categorieën gevonden...</p>
  127. ";
  128. }
  129. // line 38
  130. echo " </div>
  131. ";
  132. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  133. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  134. }
  135. public function getTemplateName()
  136. {
  137. return "VisualMediaBlogBundle/views/Blog/blog_index.html.twig";
  138. }
  139. public function isTraitable()
  140. {
  141. return false;
  142. }
  143. public function getDebugInfo()
  144. {
  145. return array ( 150 => 38, 146 => 36, 142 => 34, 132 => 30, 128 => 29, 121 => 26, 118 => 25, 116 => 24, 110 => 21, 103 => 19, 100 => 18, 96 => 17, 93 => 16, 91 => 15, 85 => 12, 81 => 11, 78 => 10, 76 => 8, 75 => 7, 71 => 5, 68 => 4, 58 => 3, 35 => 1,);
  146. }
  147. public function getSourceContext()
  148. {
  149. return new Source("{% extends 'Layout/base.html.twig' %}
  150. {% block main %}
  151. {% include '@VisualMediaVisual/Visual/visual.html.twig' with { visuals: page.visuals } %}
  152. <div id=\"blog_index\" class=\"container\">
  153. {% include '@VisualMediaBreadcrumb/Breadcrumb/breadcrumb_static.html.twig' with { breadcrumbs: [
  154. { title: page.title },
  155. ] } only %}
  156. <h1>{{ page.title }}</h1>
  157. {{ page.htmlContent|scan }}
  158. <hr>
  159. {% if categories is not empty %}
  160. <div class=\"row\">
  161. {% for category in categories %}
  162. <div class=\"col-4 mb-4\">
  163. <h2><a href=\"{{ path('blog_category', { categorySlug: category.slug }) }}\">{{ category.title }}</a></h2>
  164. <span>Aantal berichten: {{ category.getPosts()|length }}</span>
  165. <div class=\"intro-text\">
  166. {% set max = 150 %}
  167. {% set content = category.htmlContent|scan %}
  168. {{ (content|length > max ? content|slice(0, max) ~ '...' : content)|raw }}
  169. </div>
  170. <a href=\"{{ path('blog_category', { categorySlug: category.slug }) }}\">
  171. <img src=\"{{ category.upload|url }}\" style=\"width: 100%; height: 250px; object-fit: cover;\">
  172. </a>
  173. </div>
  174. {% endfor %}
  175. </div>
  176. {% else %}
  177. <p>Er zijn geen categorieën gevonden...</p>
  178. {% endif %}
  179. </div>
  180. {% endblock %}
  181. ", "VisualMediaBlogBundle/views/Blog/blog_index.html.twig", "/var/www/public_html/templates/VisualMediaBlogBundle/views/Blog/blog_index.html.twig");
  182. }
  183. }