<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
/* @Founders/Modules/posts.html.twig */
class __TwigTemplate_966eb0364155fa62125b8fe88275b37c extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@Founders/Modules/posts.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@Founders/Modules/posts.html.twig"));
// line 1
yield "<div id=\"posts-container\" class=\"site_tiles_wrapper\">
";
// line 2
$context['_parent'] = $context;
$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); })()));
foreach ($context['_seq'] as $context["_key"] => $context["post"]) {
// line 3
yield " ";
if ((CoreExtension::getAttribute($this->env, $this->source, $context["post"], "postType", [], "any", false, false, false, 3) == (isset($context["postTypeSocialInvestment"]) || array_key_exists("postTypeSocialInvestment", $context) ? $context["postTypeSocialInvestment"] : (function () { throw new RuntimeError('Variable "postTypeSocialInvestment" does not exist.', 3, $this->source); })()))) {
// line 4
yield " <a href=\"";
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->source, CoreExtension::getAttribute($this->env, $this->source, $context["post"], "category", [], "any", false, false, false, 4), "url", [], "any", false, false, false, 4), "url" => CoreExtension::getAttribute($this->env, $this->source, $context["post"], "url", [], "any", false, false, false, 4)]), "html", null, true);
yield "\" class=\"site_tiles_box\">
<div class=\"tiles_img_wrapper\">
<img class=\"tiles_img\" src=\"";
// line 6
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->source, CoreExtension::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", false, false, false, 6), "locale", [], "any", false, false, false, 6)], "method", false, false, false, 6), "big"), "html", null, true);
yield "\" alt=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["post"], "title", [], "any", false, false, false, 6), "html", null, true);
yield "\">
<span class=\"tiles_img_name\">";
// line 7
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["post"], "getCategory", [], "any", false, false, false, 7), "html", null, true);
yield "</span>
</div>
<p class=\"tiles_data\">";
// line 9
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["post"], "created", [], "any", false, false, false, 9), "d.m.Y"), "html", null, true);
yield "</p>
<p class=\"tiles_text\">";
// line 10
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["post"], "title", [], "any", false, false, false, 10), "html", null, true);
yield "</p>
</a>
";
} else {
// line 13
yield " <a href=\"";
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", false, false, false, 13), "url" => CoreExtension::getAttribute($this->env, $this->source, $context["post"], "url", [], "any", false, false, false, 13)]), "html", null, true);
yield "\" class=\"site_tiles_box\">
<div class=\"tiles_img_wrapper\">
<img class=\"tiles_img\" src=\"";
// line 15
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->source, CoreExtension::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", false, false, false, 15), "locale", [], "any", false, false, false, 15)], "method", false, false, false, 15), "big"), "html", null, true);
yield "\" alt=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["post"], "title", [], "any", false, false, false, 15), "html", null, true);
yield "\">
<span class=\"tiles_img_name\">";
// line 16
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["post"], "getCategoryTitleByTypeId", [], "any", false, false, false, 16), "html", null, true);
yield "</span>
</div>
<p class=\"tiles_data\">";
// line 18
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["post"], "created", [], "any", false, false, false, 18), "d.m.Y"), "html", null, true);
yield "</p>
<p class=\"tiles_text\">";
// line 19
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["post"], "title", [], "any", false, false, false, 19), "html", null, true);
yield "</p>
</a>
";
}
// line 22
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['post'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 23
yield "</div>
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "@Founders/Modules/posts.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
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,);
}
public function getSourceContext(): Source
{
return new Source("<div id=\"posts-container\" class=\"site_tiles_wrapper\">
{% for post in posts %}
{% if post.postType == postTypeSocialInvestment %}
<a href=\"{{ path('founders_investment_social_single', {category: post.category.url, url: post.url }) }}\" class=\"site_tiles_box\">
<div class=\"tiles_img_wrapper\">
<img class=\"tiles_img\" src=\"{{ sonata_path(post.getImagePreview(app.request.locale), 'big') }}\" alt=\"{{ post.title }}\">
<span class=\"tiles_img_name\">{{ post.getCategory }}</span>
</div>
<p class=\"tiles_data\">{{ post.created|date(\"d.m.Y\") }}</p>
<p class=\"tiles_text\">{{ post.title }}</p>
</a>
{% else %}
<a href=\"{{ path('founders_media_posts_single', {category: post.getCategoryUrlById, url: post.url }) }}\" class=\"site_tiles_box\">
<div class=\"tiles_img_wrapper\">
<img class=\"tiles_img\" src=\"{{ sonata_path(post.getImagePreview(app.request.locale), 'big') }}\" alt=\"{{ post.title }}\">
<span class=\"tiles_img_name\">{{ post.getCategoryTitleByTypeId }}</span>
</div>
<p class=\"tiles_data\">{{ post.created|date(\"d.m.Y\") }}</p>
<p class=\"tiles_text\">{{ post.title }}</p>
</a>
{% endif %}
{% endfor %}
</div>
", "@Founders/Modules/posts.html.twig", "/var/www/vidi.ua/releases/251023-65bd7d10/src/FoundersBundle/Resources/views/Modules/posts.html.twig");
}
}