<?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;
/* blocks/previews/preview-newsletters-logic.html.twig */
class __TwigTemplate_9eca5ab7e67f8ee200a4dc98ee2cdfa66221c66c13928095308a1657db7ddbf9 extends Template
{
private $source;
private $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 = [])
{
$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", "blocks/previews/preview-newsletters-logic.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "blocks/previews/preview-newsletters-logic.html.twig"));
// line 1
if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["article"] ?? null), "excerpt", [], "any", false, true, false, 1), "categories", [], "any", true, true, false, 1) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 1, $this->source); })()), "excerpt", [], "any", false, false, false, 1), "categories", [], "any", false, false, false, 1)))) {
// line 2
yield "\t";
$context["categories"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 2, $this->source); })()), "excerpt", [], "any", false, false, false, 2), "categories", [], "any", false, false, false, 2);
}
// line 4
if ((array_key_exists("articleContentLinkedWith", $context) && !Twig\Extension\CoreExtension::testEmpty((isset($context["articleContentLinkedWith"]) || array_key_exists("articleContentLinkedWith", $context) ? $context["articleContentLinkedWith"] : (function () { throw new RuntimeError('Variable "articleContentLinkedWith" does not exist.', 4, $this->source); })())))) {
// line 5
yield "\t";
$context["articleContent"] = (isset($context["articleContentLinkedWith"]) || array_key_exists("articleContentLinkedWith", $context) ? $context["articleContentLinkedWith"] : (function () { throw new RuntimeError('Variable "articleContentLinkedWith" does not exist.', 5, $this->source); })());
} else {
// line 7
yield "\t";
if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["article"] ?? null), "content", [], "any", false, true, false, 7), "content", [], "any", true, true, false, 7) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 7, $this->source); })()), "content", [], "any", false, false, false, 7), "content", [], "any", false, false, false, 7)))) {
// line 8
yield "\t\t";
$context["articleContent"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 8, $this->source); })()), "content", [], "any", false, false, false, 8), "content", [], "any", false, false, false, 8);
// line 9
yield "\t";
}
}
// line 11
if ((CoreExtension::getAttribute($this->env, $this->source, ($context["articleContent"] ?? null), "header_img", [], "any", true, true, false, 11) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, (isset($context["articleContent"]) || array_key_exists("articleContent", $context) ? $context["articleContent"] : (function () { throw new RuntimeError('Variable "articleContent" does not exist.', 11, $this->source); })()), "header_img", [], "any", false, false, false, 11)))) {
// line 12
yield "\t";
$context["img"] = CoreExtension::getAttribute($this->env, $this->source, (isset($context["articleContent"]) || array_key_exists("articleContent", $context) ? $context["articleContent"] : (function () { throw new RuntimeError('Variable "articleContent" does not exist.', 12, $this->source); })()), "header_img", [], "any", false, false, false, 12);
}
// line 14
if ((CoreExtension::getAttribute($this->env, $this->source, ($context["articleContent"] ?? null), "chapo", [], "any", true, true, false, 14) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, (isset($context["articleContent"]) || array_key_exists("articleContent", $context) ? $context["articleContent"] : (function () { throw new RuntimeError('Variable "articleContent" does not exist.', 14, $this->source); })()), "chapo", [], "any", false, false, false, 14)))) {
// line 15
yield "\t";
$context["chapo"] = CoreExtension::getAttribute($this->env, $this->source, (isset($context["articleContent"]) || array_key_exists("articleContent", $context) ? $context["articleContent"] : (function () { throw new RuntimeError('Variable "articleContent" does not exist.', 15, $this->source); })()), "chapo", [], "any", false, false, false, 15);
}
// line 17
if ((CoreExtension::getAttribute($this->env, $this->source, ($context["block"] ?? null), "slider_mode", [], "any", true, true, false, 17) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, (isset($context["block"]) || array_key_exists("block", $context) ? $context["block"] : (function () { throw new RuntimeError('Variable "block" does not exist.', 17, $this->source); })()), "slider_mode", [], "any", false, false, false, 17)))) {
// line 18
yield "\t<li class=\"splide__slide\">
\t\t<div class=\"preview-container newsletters br8 dflex fdc\">
\t\t";
} else {
// line 21
yield "\t\t\t<div class=\"preview-container newsletters br8 dflex fdc";
if ((1 === CoreExtension::compare((isset($context["i"]) || array_key_exists("i", $context) ? $context["i"] : (function () { throw new RuntimeError('Variable "i" does not exist.', 21, $this->source); })()), 2))) {
yield " not-visible-mobile-article";
}
if ((1 === CoreExtension::compare((isset($context["i"]) || array_key_exists("i", $context) ? $context["i"] : (function () { throw new RuntimeError('Variable "i" does not exist.', 21, $this->source); })()), 3))) {
yield " not-visible-tablette-article";
}
yield "\">
\t\t\t";
}
// line 23
yield "
\t\t\t<div class=\"preview-header\">
\t\t\t\t";
// line 25
if ((array_key_exists("img", $context) && !Twig\Extension\CoreExtension::testEmpty((isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 25, $this->source); })())))) {
// line 26
yield "\t\t\t\t\t";
yield from $this->loadTemplate("blocks/previews/img/image.html.twig", "blocks/previews/preview-newsletters-logic.html.twig", 26)->unwrap()->yield($context);
// line 27
yield "\t\t\t\t";
} else {
// line 28
yield "\t\t\t\t\t";
yield from $this->loadTemplate("blocks/previews/img/default-image.html.twig", "blocks/previews/preview-newsletters-logic.html.twig", 28)->unwrap()->yield($context);
// line 29
yield "\t\t\t\t";
}
// line 30
yield "\t\t\t\t<div class=\"background-color-blue\"></div>
\t\t\t\t<a href=\"";
// line 31
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Sulu\Bundle\WebsiteBundle\Twig\Content\ContentPathTwigExtension']->getContentPath(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 31, $this->source); })()), "routePath", [], "any", false, false, false, 31)), "html", null, true);
yield "\" class=\"cblue nodeco dflex aic jcc\">
\t\t\t\t\t<div class=\"fw400 fs36 lh40 cwhite\">";
// line 32
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 32, $this->source); })()), "title", [], "any", false, false, false, 32), "html", null, true);
yield "</div>
\t\t\t\t</a>
\t\t\t</div>
\t\t\t<div class=\"preview-content dflex fdc w100\">
\t\t\t\t";
// line 36
yield from $this->loadTemplate("blocks/previews-from-controller/blocks/categories.html.twig", "blocks/previews/preview-newsletters-logic.html.twig", 36)->unwrap()->yield($context);
// line 37
yield "\t\t\t\t";
if ((array_key_exists("chapo", $context) && !Twig\Extension\CoreExtension::testEmpty((isset($context["chapo"]) || array_key_exists("chapo", $context) ? $context["chapo"] : (function () { throw new RuntimeError('Variable "chapo" does not exist.', 37, $this->source); })())))) {
// line 38
yield "\t\t\t\t\t<div class=\"lh24 preview-chapo fw500 lh28 fs20";
if (((array_key_exists("categories", $context) && !Twig\Extension\CoreExtension::testEmpty((isset($context["categories"]) || array_key_exists("categories", $context) ? $context["categories"] : (function () { throw new RuntimeError('Variable "categories" does not exist.', 38, $this->source); })()))) && (0 === CoreExtension::compare(Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["categories"]) || array_key_exists("categories", $context) ? $context["categories"] : (function () { throw new RuntimeError('Variable "categories" does not exist.', 38, $this->source); })())), 2)))) {
yield " threelines";
}
if (((array_key_exists("categories", $context) && !Twig\Extension\CoreExtension::testEmpty((isset($context["categories"]) || array_key_exists("categories", $context) ? $context["categories"] : (function () { throw new RuntimeError('Variable "categories" does not exist.', 38, $this->source); })()))) && (0 === CoreExtension::compare(Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["categories"]) || array_key_exists("categories", $context) ? $context["categories"] : (function () { throw new RuntimeError('Variable "categories" does not exist.', 38, $this->source); })())), 3)))) {
yield " twolines";
}
yield "\">
\t\t\t\t\t\t";
// line 39
yield Twig\Extension\CoreExtension::striptags((isset($context["chapo"]) || array_key_exists("chapo", $context) ? $context["chapo"] : (function () { throw new RuntimeError('Variable "chapo" does not exist.', 39, $this->source); })()));
yield "
\t\t\t\t\t</div>
\t\t\t\t";
}
// line 42
yield "\t\t\t</div>
\t\t\t<div class=\"mta\">
\t\t\t\t";
// line 44
if ((CoreExtension::getAttribute($this->env, $this->source, ($context["article"] ?? null), "authored", [], "any", true, true, false, 44) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 44, $this->source); })()), "authored", [], "any", false, false, false, 44)))) {
// line 45
yield "\t\t\t\t\t<span class=\"cgrey fs14 lh20\">PubliƩ le
\t\t\t\t\t\t";
// line 46
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extra\Intl\IntlExtension']->formatDateTime($this->env, CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 46, $this->source); })()), "authored", [], "any", false, false, false, 46), "short", "none", "", null, "gregorian", "fr"), "html", null, true);
yield "
\t\t\t\t\t</span>
\t\t\t\t";
}
// line 49
yield "\t\t\t</div>
\t\t\t";
// line 50
if ((CoreExtension::getAttribute($this->env, $this->source, ($context["block"] ?? null), "slider_mode", [], "any", true, true, false, 50) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, (isset($context["block"]) || array_key_exists("block", $context) ? $context["block"] : (function () { throw new RuntimeError('Variable "block" does not exist.', 50, $this->source); })()), "slider_mode", [], "any", false, false, false, 50)))) {
// line 51
yield "\t\t\t</div>
\t\t</li>
";
} else {
// line 54
yield "\t</div>
";
}
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "blocks/previews/preview-newsletters-logic.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 174 => 54, 169 => 51, 167 => 50, 164 => 49, 158 => 46, 155 => 45, 153 => 44, 149 => 42, 143 => 39, 133 => 38, 130 => 37, 128 => 36, 121 => 32, 117 => 31, 114 => 30, 111 => 29, 108 => 28, 105 => 27, 102 => 26, 100 => 25, 96 => 23, 85 => 21, 80 => 18, 78 => 17, 74 => 15, 72 => 14, 68 => 12, 66 => 11, 62 => 9, 59 => 8, 56 => 7, 52 => 5, 50 => 4, 46 => 2, 44 => 1,);
}
public function getSourceContext()
{
return new Source("{% if article.excerpt.categories is defined and article.excerpt.categories is not empty %}
\t{% set categories = article.excerpt.categories %}
{% endif %}
{% if articleContentLinkedWith is defined and articleContentLinkedWith is not empty %}
\t{% set articleContent = articleContentLinkedWith %}
{% else %}
\t{% if article.content.content is defined and article.content.content is not empty %}
\t\t{% set articleContent = article.content.content %}
\t{% endif %}
{% endif %}
{% if articleContent.header_img is defined and articleContent.header_img is not empty %}
\t{% set img = articleContent.header_img %}
{% endif %}
{% if articleContent.chapo is defined and articleContent.chapo is not empty %}
\t{% set chapo = articleContent.chapo %}
{% endif %}
{% if block.slider_mode is defined and block.slider_mode is not empty %}
\t<li class=\"splide__slide\">
\t\t<div class=\"preview-container newsletters br8 dflex fdc\">
\t\t{% else %}
\t\t\t<div class=\"preview-container newsletters br8 dflex fdc{% if i > 2 %} not-visible-mobile-article{% endif %}{% if i > 3 %} not-visible-tablette-article{% endif %}\">
\t\t\t{% endif %}
\t\t\t<div class=\"preview-header\">
\t\t\t\t{% if img is defined and img is not empty %}
\t\t\t\t\t{% include \"blocks/previews/img/image.html.twig\" %}
\t\t\t\t{% else %}
\t\t\t\t\t{% include \"blocks/previews/img/default-image.html.twig\" %}
\t\t\t\t{% endif %}
\t\t\t\t<div class=\"background-color-blue\"></div>
\t\t\t\t<a href=\"{{ sulu_content_path(article.routePath) }}\" class=\"cblue nodeco dflex aic jcc\">
\t\t\t\t\t<div class=\"fw400 fs36 lh40 cwhite\">{{ article.title }}</div>
\t\t\t\t</a>
\t\t\t</div>
\t\t\t<div class=\"preview-content dflex fdc w100\">
\t\t\t\t{% include \"blocks/previews-from-controller/blocks/categories.html.twig\" %}
\t\t\t\t{% if chapo is defined and chapo is not empty %}
\t\t\t\t\t<div class=\"lh24 preview-chapo fw500 lh28 fs20{% if categories is defined and categories is not empty and categories|length == 2 %} threelines{% endif %}{% if categories is defined and categories is not empty and categories|length == 3 %} twolines{% endif %}\">
\t\t\t\t\t\t{{ chapo|striptags|raw }}
\t\t\t\t\t</div>
\t\t\t\t{% endif %}
\t\t\t</div>
\t\t\t<div class=\"mta\">
\t\t\t\t{% if article.authored is defined and article.authored is not empty %}
\t\t\t\t\t<span class=\"cgrey fs14 lh20\">PubliƩ le
\t\t\t\t\t\t{{ article.authored|format_datetime('short', 'none', locale='fr') }}
\t\t\t\t\t</span>
\t\t\t\t{% endif %}
\t\t\t</div>
\t\t\t{% if block.slider_mode is defined and block.slider_mode is not empty %}
\t\t\t</div>
\t\t</li>
{% else %}
\t</div>
{% endif %}", "blocks/previews/preview-newsletters-logic.html.twig", "/var/www/html/templates/blocks/previews/preview-newsletters-logic.html.twig");
}
}