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