var/cache/dev/twig/50/50f4593efdd0d38bc9395f5e57977575994863c979ee646f6765316aef8e7130.php line 84

Open in your IDE?
  1. <?php
  2. /* blog/index.html.twig */
  3. class __TwigTemplate_271bd68b345e0cf5c130849147384ead603f51447752d1191e62d7f801270e9c extends Twig_Template
  4. {
  5.     private $source;
  6.     public function __construct(Twig_Environment $env)
  7.     {
  8.         parent::__construct($env);
  9.         $this->source $this->getSourceContext();
  10.         // line 1
  11.         $this->parent $this->loadTemplate("base.html.twig""blog/index.html.twig"1);
  12.         $this->blocks = [
  13.             'body_id' => [$this'block_body_id'],
  14.             'main' => [$this'block_main'],
  15.             'sidebar' => [$this'block_sidebar'],
  16.         ];
  17.     }
  18.     protected function doGetParent(array $context)
  19.     {
  20.         return "base.html.twig";
  21.     }
  22.     protected function doDisplay(array $context, array $blocks = [])
  23.     {
  24.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  25.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new Twig_Profiler_Profile($this->getTemplateName(), "template""blog/index.html.twig"));
  26.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  27.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new Twig_Profiler_Profile($this->getTemplateName(), "template""blog/index.html.twig"));
  28.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  29.         
  30.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  31.         
  32.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  33.     }
  34.     // line 3
  35.     public function block_body_id($context, array $blocks = [])
  36.     {
  37.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  38.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block""body_id"));
  39.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  40.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block""body_id"));
  41.         echo "blog_index";
  42.         
  43.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  44.         
  45.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  46.     }
  47.     // line 5
  48.     public function block_main($context, array $blocks = [])
  49.     {
  50.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  51.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block""main"));
  52.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  53.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block""main"));
  54.         // line 6
  55.         echo "    ";
  56.         $context['_parent'] = $context;
  57.         $context['_seq'] = twig_ensure_traversable((isset($context["posts"]) || array_key_exists("posts"$context) ? $context["posts"] : (function () { throw new Twig_Error_Runtime('Variable "posts" does not exist.'6$this->source); })()));
  58.         $context['_iterated'] = false;
  59.         $context['loop'] = [
  60.           'parent' => $context['_parent'],
  61.           'index0' => 0,
  62.           'index'  => 1,
  63.           'first'  => true,
  64.         ];
  65.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof Countable)) {
  66.             $length count($context['_seq']);
  67.             $context['loop']['revindex0'] = $length 1;
  68.             $context['loop']['revindex'] = $length;
  69.             $context['loop']['length'] = $length;
  70.             $context['loop']['last'] = === $length;
  71.         }
  72.         foreach ($context['_seq'] as $context["_key"] => $context["post"]) {
  73.             // line 7
  74.             echo "        <article class=\"post\">
  75.             <h2>
  76.                 <a href=\"";
  77.             // line 9
  78.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("blog_post", ["slug" => twig_get_attribute($this->env$this->source$context["post"], "slug", [])]), "html"nulltrue);
  79.             echo "\">
  80.                     ";
  81.             // line 10
  82.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["post"], "title", []), "html"nulltrue);
  83.             echo "
  84.                 </a>
  85.             </h2>
  86.             <p class=\"post-metadata\">
  87.                 <span class=\"metadata\"><i class=\"fa fa-calendar\"></i> ";
  88.             // line 15
  89.             echo twig_escape_filter($this->envtwig_localized_date_filter($this->envtwig_get_attribute($this->env$this->source$context["post"], "publishedAt", []), "long""medium"null"UTC"), "html"nulltrue);
  90.             echo "</span>
  91.                 <span class=\"metadata\"><i class=\"fa fa-user\"></i> ";
  92.             // line 16
  93.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["post"], "author", []), "fullName", []), "html"nulltrue);
  94.             echo "</span>
  95.             </p>
  96.             ";
  97.             // line 19
  98.             echo $this->extensions['App\Twig\AppExtension']->markdownToHtml(twig_get_attribute($this->env$this->source$context["post"], "summary", []));
  99.             echo "
  100.             ";
  101.             // line 21
  102.             echo twig_include($this->env$context"blog/_post_tags.html.twig");
  103.             echo "
  104.         </article>
  105.     ";
  106.             $context['_iterated'] = true;
  107.             ++$context['loop']['index0'];
  108.             ++$context['loop']['index'];
  109.             $context['loop']['first'] = false;
  110.             if (isset($context['loop']['length'])) {
  111.                 --$context['loop']['revindex0'];
  112.                 --$context['loop']['revindex'];
  113.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  114.             }
  115.         }
  116.         if (!$context['_iterated']) {
  117.             // line 24
  118.             echo "        <div class=\"well\">";
  119.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("post.no_posts_found"), "html"nulltrue);
  120.             echo "</div>
  121.     ";
  122.         }
  123.         $_parent $context['_parent'];
  124.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['post'], $context['_parent'], $context['loop']);
  125.         $context array_intersect_key($context$_parent) + $_parent;
  126.         // line 26
  127.         echo "
  128.     ";
  129.         // line 27
  130.         if (twig_get_attribute($this->env$this->source, (isset($context["posts"]) || array_key_exists("posts"$context) ? $context["posts"] : (function () { throw new Twig_Error_Runtime('Variable "posts" does not exist.'27$this->source); })()), "haveToPaginate", [])) {
  131.             // line 28
  132.             echo "        <div class=\"navigation text-center\">
  133.             ";
  134.             // line 29
  135.             echo $this->extensions['WhiteOctober\PagerfantaBundle\Twig\PagerfantaExtension']->renderPagerfanta((isset($context["posts"]) || array_key_exists("posts"$context) ? $context["posts"] : (function () { throw new Twig_Error_Runtime('Variable "posts" does not exist.'29$this->source); })()), "twitter_bootstrap3_translated", ["routeName" => "blog_index_paginated"]);
  136.             echo "
  137.         </div>
  138.     ";
  139.         }
  140.         
  141.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  142.         
  143.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  144.     }
  145.     // line 34
  146.     public function block_sidebar($context, array $blocks = [])
  147.     {
  148.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  149.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block""sidebar"));
  150.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  151.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block""sidebar"));
  152.         // line 35
  153.         echo "    ";
  154.         $this->displayParentBlock("sidebar"$context$blocks);
  155.         echo "
  156.     ";
  157.         // line 37
  158.         echo $this->extensions['App\Twig\SourceCodeExtension']->showSourceCode($this->env$this->getTemplateName());
  159.         echo "
  160.     ";
  161.         // line 38
  162.         echo twig_include($this->env$context"blog/_rss.html.twig");
  163.         echo "
  164. ";
  165.         
  166.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  167.         
  168.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  169.     }
  170.     public function getTemplateName()
  171.     {
  172.         return "blog/index.html.twig";
  173.     }
  174.     public function isTraitable()
  175.     {
  176.         return false;
  177.     }
  178.     public function getDebugInfo()
  179.     {
  180.         return array (  189 => 38,  185 => 37,  179 => 35,  170 => 34,  156 => 29,  153 => 28,  151 => 27,  148 => 26,  139 => 24,  123 => 21,  118 => 19,  112 => 16,  108 => 15,  100 => 10,  96 => 9,  92 => 7,  73 => 6,  64 => 5,  46 => 3,  15 => 1,);
  181.     }
  182.     public function getSourceContext()
  183.     {
  184.         return new Twig_Source("{% extends 'base.html.twig' %}
  185. {% block body_id 'blog_index' %}
  186. {% block main %}
  187.     {% for post in posts %}
  188.         <article class=\"post\">
  189.             <h2>
  190.                 <a href=\"{{ path('blog_post', {slug: post.slug}) }}\">
  191.                     {{ post.title }}
  192.                 </a>
  193.             </h2>
  194.             <p class=\"post-metadata\">
  195.                 <span class=\"metadata\"><i class=\"fa fa-calendar\"></i> {{ post.publishedAt|localizeddate('long', 'medium', null, 'UTC') }}</span>
  196.                 <span class=\"metadata\"><i class=\"fa fa-user\"></i> {{ post.author.fullName }}</span>
  197.             </p>
  198.             {{ post.summary|md2html }}
  199.             {{ include('blog/_post_tags.html.twig') }}
  200.         </article>
  201.     {% else %}
  202.         <div class=\"well\">{{ 'post.no_posts_found'|trans }}</div>
  203.     {% endfor %}
  204.     {% if posts.haveToPaginate %}
  205.         <div class=\"navigation text-center\">
  206.             {{ pagerfanta(posts, 'twitter_bootstrap3_translated', {routeName: 'blog_index_paginated'}) }}
  207.         </div>
  208.     {% endif %}
  209. {% endblock %}
  210. {% block sidebar %}
  211.     {{ parent() }}
  212.     {{ show_source_code(_self) }}
  213.     {{ include('blog/_rss.html.twig') }}
  214. {% endblock %}
  215. ""blog/index.html.twig""/var/www/html/templates/blog/index.html.twig");
  216.     }
  217. }