<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
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;
/* Pages/NewsPage/pagetemplate.html.twig */
class __TwigTemplate_696b602af465b366b75467f7f2736de3d43b6df297cf37b9f9ba9578b1b17951 extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
'breadcrumbs' => [$this, 'block_breadcrumbs'],
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Pages/NewsPage/pagetemplate.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Pages/NewsPage/pagetemplate.html.twig"));
// line 1
echo "<div id=\"fb-root\"></div>
<script async defer crossorigin=\"anonymous\" src=\"https://connect.facebook.net/pl_PL/sdk.js#xfbml=1&version=v3.3\"></script>
<div class=\"news-page\">
";
// line 7
echo " ";
$this->loadTemplate("Layout/_page-header.html.twig", "Pages/NewsPage/pagetemplate.html.twig", 7)->display(twig_array_merge($context, ["page" => (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 7, $this->source); })())]));
// line 8
echo "
";
// line 10
echo " ";
$this->displayBlock('breadcrumbs', $context, $blocks);
// line 13
echo "
";
// line 14
$context["author"] = 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.', 14, $this->source); })()), "getAuthor", [], "method", false, false, false, 14);
// line 15
echo " <div class=\"content row\">
<article class=\"blog-item col-lg-9\">
<header class=\"blog-item__head\">
<h2 class=\"blog-item__head__title simple\" role=\"heading\" aria-level=\"2\">
";
// line 21
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.', 21, $this->source); })()), "pageTitle", [], "any", false, false, false, 21), "html", null, true);
echo "
</h2>
<time class=\"blog-item__head__meta\">
";
// line 25
echo twig_escape_filter($this->env, twig_date_format_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.', 25, $this->source); })()), "date", [], "any", false, false, false, 25), "d.m.Y"), "html", null, true);
echo "
";
// line 29
echo " </time>
<div class=\"article-categories\">
";
// line 32
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(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.', 32, $this->source); })()), "tags", [], "any", false, false, false, 32));
foreach ($context['_seq'] as $context["_key"] => $context["tag"]) {
// line 33
echo " <span>";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["tag"], "name", [], "any", false, false, false, 33), "html", null, true);
echo "</span>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['tag'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 38
echo " </div>
</header>
";
// line 41
if ((twig_get_attribute($this->env, $this->source, ($context["page"] ?? null), "summary", [], "any", true, true, false, 41) && !twig_test_empty(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.', 41, $this->source); })()), "summary", [], "any", false, false, false, 41)))) {
echo "<p class=\"blog-item--summary\">";
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.', 41, $this->source); })()), "summary", [], "any", false, false, false, 41), "html", null, true);
echo "</p>";
}
// line 42
echo "
";
// line 43
echo $this->extensions['Kunstmaan\PagePartBundle\Twig\Extension\PagePartTwigExtension']->renderPageParts($this->env, $context, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 43, $this->source); })()), "newsmain");
echo "
<div class=\"fb-share-button\" data-href=\"";
// line 45
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 45, $this->source); })()), "request", [], "any", false, false, false, 45), "uri", [], "any", false, false, false, 45), "html", null, true);
echo "\" data-layout=\"button\" data-size=\"large\"><a target=\"_blank\" href=\"https://www.facebook.com/sharer/sharer.php?u=";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 45, $this->source); })()), "request", [], "any", false, false, false, 45), "uri", [], "any", false, false, false, 45), "html", null, true);
echo "&src=sdkpreparse\" class=\"fb-xfbml-parse-ignore\">Udostępnij</a></div>
</article>
<div class=\"latest-news col-lg-3\">
<h2 role=\"heading\" aria-level=\"2\">";
// line 50
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("news.latest_news.read-more"), "html", null, true);
echo "</h2>
";
// line 51
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragmentStrategy("esi", Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\NewsArticleController:lastNews", ["limit" => 3, "categories" => 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.', 51, $this->source); })()), "getCategoriesIds", [], "any", false, false, false, 51)]));
echo "
<div class=\"text--right\">
";
// line 54
$context["categoriesList"] = "";
// line 55
echo "
";
// line 56
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(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.', 56, $this->source); })()), "getCategoriesIds", [], "any", false, false, false, 56));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["categoryId"]) {
// line 57
echo "
";
// line 58
$context["categoriesList"] = ((isset($context["categoriesList"]) || array_key_exists("categoriesList", $context) ? $context["categoriesList"] : (function () { throw new RuntimeError('Variable "categoriesList" does not exist.', 58, $this->source); })()) . $context["categoryId"]);
// line 59
echo " ";
if ( !twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 59)) {
// line 60
echo " ";
$context["categoriesList"] = ((isset($context["categoriesList"]) || array_key_exists("categoriesList", $context) ? $context["categoriesList"] : (function () { throw new RuntimeError('Variable "categoriesList" does not exist.', 60, $this->source); })()) . ",");
// line 61
echo " ";
}
// line 62
echo "
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['categoryId'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 64
echo "
<a href=\"";
// line 65
echo twig_escape_filter($this->env, $this->extensions['Kunstmaan\NodeBundle\Twig\NodeTwigExtension']->getUrlByInternalName("news", twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 65, $this->source); })()), "request", [], "any", false, false, false, 65), "locale", [], "any", false, false, false, 65)), "html", null, true);
echo "?category=";
echo twig_escape_filter($this->env, (isset($context["categoriesList"]) || array_key_exists("categoriesList", $context) ? $context["categoriesList"] : (function () { throw new RuntimeError('Variable "categoriesList" does not exist.', 65, $this->source); })()), "html", null, true);
echo "\" class=\"btn btn--blue\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("news.latest_news.read-more"), "html", null, true);
echo "</a>
</div>
</div>
</div>
</div>
";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 10
public function block_breadcrumbs($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "breadcrumbs"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "breadcrumbs"));
// line 11
echo " ";
$this->loadTemplate("Layout/_breadcrumbs.html.twig", "Pages/NewsPage/pagetemplate.html.twig", 11)->display(twig_array_merge($context, ["refererString" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 11, $this->source); })()), "request", [], "any", false, false, false, 11), "get", [0 => "path"], "method", false, false, false, 11)]));
// line 12
echo " ";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "Pages/NewsPage/pagetemplate.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 231 => 12, 228 => 11, 218 => 10, 195 => 65, 192 => 64, 177 => 62, 174 => 61, 171 => 60, 168 => 59, 166 => 58, 163 => 57, 146 => 56, 143 => 55, 141 => 54, 135 => 51, 131 => 50, 121 => 45, 116 => 43, 113 => 42, 107 => 41, 102 => 38, 93 => 33, 89 => 32, 84 => 29, 80 => 25, 73 => 21, 65 => 15, 63 => 14, 60 => 13, 57 => 10, 54 => 8, 51 => 7, 44 => 1,);
}
public function getSourceContext()
{
return new Source("<div id=\"fb-root\"></div>
<script async defer crossorigin=\"anonymous\" src=\"https://connect.facebook.net/pl_PL/sdk.js#xfbml=1&version=v3.3\"></script>
<div class=\"news-page\">
{# Page Header #}
{% include 'Layout/_page-header.html.twig' with { 'page' : page } %}
{# Breadcrumbs #}
{% block breadcrumbs %}
{% include 'Layout/_breadcrumbs.html.twig' with { 'refererString' : app.request.get('path') } %}
{% endblock %}
{% set author = page.getAuthor() %}
<div class=\"content row\">
<article class=\"blog-item col-lg-9\">
<header class=\"blog-item__head\">
<h2 class=\"blog-item__head__title simple\" role=\"heading\" aria-level=\"2\">
{{ page.pageTitle }}
</h2>
<time class=\"blog-item__head__meta\">
{{ page.date | date(\"d.m.Y\")}}
{# {% if author is not empty %}#}
{# | <strong>{{ author.name }}</strong>#}
{# {% endif %}#}
</time>
<div class=\"article-categories\">
{% for tag in page.tags %}
<span>{{ tag.name }}</span>
{% endfor %}
{# {% for category in page.categories %}#}
{# <span>{{ category.name }}</span>#}
{# {% endfor %}#}
</div>
</header>
{% if page.summary is defined and page.summary is not empty %}<p class=\"blog-item--summary\">{{ page.summary }}</p>{% endif %}
{{ render_pageparts(page, 'newsmain') }}
<div class=\"fb-share-button\" data-href=\"{{ app.request.uri }}\" data-layout=\"button\" data-size=\"large\"><a target=\"_blank\" href=\"https://www.facebook.com/sharer/sharer.php?u={{ app.request.uri }}&src=sdkpreparse\" class=\"fb-xfbml-parse-ignore\">Udostępnij</a></div>
</article>
<div class=\"latest-news col-lg-3\">
<h2 role=\"heading\" aria-level=\"2\">{{ 'news.latest_news.read-more' | trans }}</h2>
{{ render_esi(controller('App\\\\Controller\\\\NewsArticleController:lastNews', { 'limit' : 3, 'categories' : page.getCategoriesIds } )) }}
<div class=\"text--right\">
{% set categoriesList = \"\" %}
{% for categoryId in page.getCategoriesIds %}
{% set categoriesList = categoriesList ~ categoryId %}
{% if not loop.last %}
{% set categoriesList = categoriesList ~ ',' %}
{% endif %}
{% endfor %}
<a href=\"{{ get_url_by_internal_name('news', app.request.locale) }}?category={{ categoriesList }}\" class=\"btn btn--blue\">{{ 'news.latest_news.read-more' | trans }}</a>
</div>
</div>
</div>
</div>
", "Pages/NewsPage/pagetemplate.html.twig", "/var/www/gcs/html/dev/templates/Pages/NewsPage/pagetemplate.html.twig");
}
}