var/cache/dev/twig/87/874ba575ef627af37e26b620ccdfe88f.php line 86

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* @Founders/Modules/posts.html.twig */
  16. class __TwigTemplate_966eb0364155fa62125b8fe88275b37c extends Template
  17. {
  18.     private Source $source;
  19.     /**
  20.      * @var array<string, Template>
  21.      */
  22.     private array $macros = [];
  23.     public function __construct(Environment $env)
  24.     {
  25.         parent::__construct($env);
  26.         $this->source $this->getSourceContext();
  27.         $this->parent false;
  28.         $this->blocks = [
  29.         ];
  30.     }
  31.     protected function doDisplay(array $context, array $blocks = []): iterable
  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""@Founders/Modules/posts.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""@Founders/Modules/posts.html.twig"));
  38.         // line 1
  39.         yield "<div id=\"posts-container\" class=\"site_tiles_wrapper\">
  40.     ";
  41.         // line 2
  42.         $context['_parent'] = $context;
  43.         $context['_seq'] = CoreExtension::ensureTraversable((isset($context["posts"]) || array_key_exists("posts"$context) ? $context["posts"] : (function () { throw new RuntimeError('Variable "posts" does not exist.'2$this->source); })()));
  44.         foreach ($context['_seq'] as $context["_key"] => $context["post"]) {
  45.             // line 3
  46.             yield "        ";
  47.             if ((CoreExtension::getAttribute($this->env$this->source$context["post"], "postType", [], "any"falsefalsefalse3) == (isset($context["postTypeSocialInvestment"]) || array_key_exists("postTypeSocialInvestment"$context) ? $context["postTypeSocialInvestment"] : (function () { throw new RuntimeError('Variable "postTypeSocialInvestment" does not exist.'3$this->source); })()))) {
  48.                 // line 4
  49.                 yield "            <a href=\"";
  50.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("founders_investment_social_single", ["category" => CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["post"], "category", [], "any"falsefalsefalse4), "url", [], "any"falsefalsefalse4), "url" => CoreExtension::getAttribute($this->env$this->source$context["post"], "url", [], "any"falsefalsefalse4)]), "html"nulltrue);
  51.                 yield "\" class=\"site_tiles_box\">
  52.                 <div class=\"tiles_img_wrapper\">
  53.                     <img class=\"tiles_img\" src=\"";
  54.                 // line 6
  55.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('Sonata\MediaBundle\Twig\MediaRuntime')->path(CoreExtension::getAttribute($this->env$this->source$context["post"], "getImagePreview", [CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'6$this->source); })()), "request", [], "any"falsefalsefalse6), "locale", [], "any"falsefalsefalse6)], "method"falsefalsefalse6), "big"), "html"nulltrue);
  56.                 yield "\" alt=\"";
  57.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["post"], "title", [], "any"falsefalsefalse6), "html"nulltrue);
  58.                 yield "\">
  59.                     <span class=\"tiles_img_name\">";
  60.                 // line 7
  61.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["post"], "getCategory", [], "any"falsefalsefalse7), "html"nulltrue);
  62.                 yield "</span>
  63.                 </div>
  64.                 <p class=\"tiles_data\">";
  65.                 // line 9
  66.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env$this->source$context["post"], "created", [], "any"falsefalsefalse9), "d.m.Y"), "html"nulltrue);
  67.                 yield "</p>
  68.                 <p class=\"tiles_text\">";
  69.                 // line 10
  70.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["post"], "title", [], "any"falsefalsefalse10), "html"nulltrue);
  71.                 yield "</p>
  72.             </a>
  73.         ";
  74.             } else {
  75.                 // line 13
  76.                 yield "            <a href=\"";
  77.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("founders_media_posts_single", ["category" => CoreExtension::getAttribute($this->env$this->source$context["post"], "getCategoryUrlById", [], "any"falsefalsefalse13), "url" => CoreExtension::getAttribute($this->env$this->source$context["post"], "url", [], "any"falsefalsefalse13)]), "html"nulltrue);
  78.                 yield "\" class=\"site_tiles_box\">
  79.                 <div class=\"tiles_img_wrapper\">
  80.                     <img class=\"tiles_img\" src=\"";
  81.                 // line 15
  82.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('Sonata\MediaBundle\Twig\MediaRuntime')->path(CoreExtension::getAttribute($this->env$this->source$context["post"], "getImagePreview", [CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'15$this->source); })()), "request", [], "any"falsefalsefalse15), "locale", [], "any"falsefalsefalse15)], "method"falsefalsefalse15), "big"), "html"nulltrue);
  83.                 yield "\" alt=\"";
  84.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["post"], "title", [], "any"falsefalsefalse15), "html"nulltrue);
  85.                 yield "\">
  86.                     <span class=\"tiles_img_name\">";
  87.                 // line 16
  88.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["post"], "getCategoryTitleByTypeId", [], "any"falsefalsefalse16), "html"nulltrue);
  89.                 yield "</span>
  90.                 </div>
  91.                 <p class=\"tiles_data\">";
  92.                 // line 18
  93.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env$this->source$context["post"], "created", [], "any"falsefalsefalse18), "d.m.Y"), "html"nulltrue);
  94.                 yield "</p>
  95.                 <p class=\"tiles_text\">";
  96.                 // line 19
  97.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["post"], "title", [], "any"falsefalsefalse19), "html"nulltrue);
  98.                 yield "</p>
  99.             </a>
  100.         ";
  101.             }
  102.             // line 22
  103.             yield "    ";
  104.         }
  105.         $_parent $context['_parent'];
  106.         unset($context['_seq'], $context['_key'], $context['post'], $context['_parent']);
  107.         $context array_intersect_key($context$_parent) + $_parent;
  108.         // line 23
  109.         yield "</div>
  110. ";
  111.         
  112.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  113.         
  114.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  115.         yield from [];
  116.     }
  117.     /**
  118.      * @codeCoverageIgnore
  119.      */
  120.     public function getTemplateName(): string
  121.     {
  122.         return "@Founders/Modules/posts.html.twig";
  123.     }
  124.     /**
  125.      * @codeCoverageIgnore
  126.      */
  127.     public function isTraitable(): bool
  128.     {
  129.         return false;
  130.     }
  131.     /**
  132.      * @codeCoverageIgnore
  133.      */
  134.     public function getDebugInfo(): array
  135.     {
  136.         return array (  118 => 23,  112 => 22,  106 => 19,  102 => 18,  97 => 16,  91 => 15,  85 => 13,  79 => 10,  75 => 9,  70 => 7,  64 => 6,  58 => 4,  55 => 3,  51 => 2,  48 => 1,);
  137.     }
  138.     public function getSourceContext(): Source
  139.     {
  140.         return new Source("<div id=\"posts-container\" class=\"site_tiles_wrapper\">
  141.     {% for post in posts %}
  142.         {% if post.postType == postTypeSocialInvestment %}
  143.             <a href=\"{{ path('founders_investment_social_single', {category: post.category.url, url: post.url }) }}\" class=\"site_tiles_box\">
  144.                 <div class=\"tiles_img_wrapper\">
  145.                     <img class=\"tiles_img\" src=\"{{ sonata_path(post.getImagePreview(app.request.locale), 'big') }}\" alt=\"{{ post.title }}\">
  146.                     <span class=\"tiles_img_name\">{{ post.getCategory }}</span>
  147.                 </div>
  148.                 <p class=\"tiles_data\">{{ post.created|date(\"d.m.Y\") }}</p>
  149.                 <p class=\"tiles_text\">{{ post.title }}</p>
  150.             </a>
  151.         {% else %}
  152.             <a href=\"{{ path('founders_media_posts_single', {category: post.getCategoryUrlById, url: post.url }) }}\" class=\"site_tiles_box\">
  153.                 <div class=\"tiles_img_wrapper\">
  154.                     <img class=\"tiles_img\" src=\"{{ sonata_path(post.getImagePreview(app.request.locale), 'big') }}\" alt=\"{{ post.title }}\">
  155.                     <span class=\"tiles_img_name\">{{ post.getCategoryTitleByTypeId }}</span>
  156.                 </div>
  157.                 <p class=\"tiles_data\">{{ post.created|date(\"d.m.Y\") }}</p>
  158.                 <p class=\"tiles_text\">{{ post.title }}</p>
  159.             </a>
  160.         {% endif %}
  161.     {% endfor %}
  162. </div>
  163. ""@Founders/Modules/posts.html.twig""/var/www/vidi.ua/releases/251023-65bd7d10/src/FoundersBundle/Resources/views/Modules/posts.html.twig");
  164.     }
  165. }