<?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;
/* Frontend/layout.html.twig */
class __TwigTemplate_16db6792f3a1d1b8cb35634183b2cba761d36661ba8815fb2c7d2eafc5925ff5 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'seo' => [$this, 'block_seo'],
'body' => [$this, 'block_body'],
'appcheck' => [$this, 'block_appcheck'],
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "Frontend/base.html.twig";
}
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", "Frontend/layout.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Frontend/layout.html.twig"));
// line 3
$context["aTeams"] = twig_get_attribute($this->env, $this->source, (isset($context["navHelper"]) || array_key_exists("navHelper", $context) ? $context["navHelper"] : (function () { throw new RuntimeError('Variable "navHelper" does not exist.', 3, $this->source); })()), "getTeams", [], "method", false, false, false, 3);
// line 5
$context["aNewsCategs"] = twig_get_attribute($this->env, $this->source, (isset($context["navHelper"]) || array_key_exists("navHelper", $context) ? $context["navHelper"] : (function () { throw new RuntimeError('Variable "navHelper" does not exist.', 5, $this->source); })()), "getNewsCategories", [], "method", false, false, false, 5);
// line 6
$context["aSponsors"] = twig_get_attribute($this->env, $this->source, (isset($context["navHelper"]) || array_key_exists("navHelper", $context) ? $context["navHelper"] : (function () { throw new RuntimeError('Variable "navHelper" does not exist.', 6, $this->source); })()), "getSponsors", [], "method", false, false, false, 6);
// line 7
$context["aHeaderSponsors"] = twig_get_attribute($this->env, $this->source, (isset($context["navHelper"]) || array_key_exists("navHelper", $context) ? $context["navHelper"] : (function () { throw new RuntimeError('Variable "navHelper" does not exist.', 7, $this->source); })()), "getHeaderSponsors", [], "method", false, false, false, 7);
// line 8
$context["audio"] = twig_get_attribute($this->env, $this->source, (isset($context["navHelper"]) || array_key_exists("navHelper", $context) ? $context["navHelper"] : (function () { throw new RuntimeError('Variable "navHelper" does not exist.', 8, $this->source); })()), "getAudio", [], "method", false, false, false, 8);
// line 9
$context["fromChina"] = twig_get_attribute($this->env, $this->source, (isset($context["navHelper"]) || array_key_exists("navHelper", $context) ? $context["navHelper"] : (function () { throw new RuntimeError('Variable "navHelper" does not exist.', 9, $this->source); })()), "clientInChina", [], "method", false, false, false, 9);
// line 12
$context["currentYear"] = twig_date_format_filter($this->env, "now", "Y");
// line 13
$context["aLangsUrls"] = twig_get_attribute($this->env, $this->source, (isset($context["navHelper"]) || array_key_exists("navHelper", $context) ? $context["navHelper"] : (function () { throw new RuntimeError('Variable "navHelper" does not exist.', 13, $this->source); })()), "getUrlsForLanguageSelector", [], "method", false, false, false, 13);
// line 15
$context["ticketsUrl"] = "https://tickets.rcdespanyol.com/index.php/en/entradas-en";
// line 16
$context["becomeMember"] = "https://tickets.rcdespanyol.com/index.php/en/";
// line 17
if ((0 === twig_compare(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.', 17, $this->source); })()), "request", [], "any", false, false, false, 17), "locale", [], "any", false, false, false, 17), "es"))) {
// line 18
$context["ticketsUrl"] = "https://tickets.rcdespanyol.com/index.php/es/entradas-es";
// line 19
$context["becomeMember"] = "https://tickets.rcdespanyol.com/index.php/es/";
} elseif ((0 === twig_compare(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 20
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 20, $this->source); })()), "request", [], "any", false, false, false, 20), "locale", [], "any", false, false, false, 20), "ca"))) {
// line 21
$context["ticketsUrl"] = "https://tickets.rcdespanyol.com/index.php/ca/entrades";
// line 22
$context["becomeMember"] = "https://tickets.rcdespanyol.com/index.php/ca/";
}
// line 25
$context["langArrayIndex"] = 0;
// line 26
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["langs"]) || array_key_exists("langs", $context) ? $context["langs"] : (function () { throw new RuntimeError('Variable "langs" does not exist.', 26, $this->source); })()));
$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["langCode"] => $context["la"]) {
// line 27
if ((0 === twig_compare($context["langCode"], 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.', 27, $this->source); })()), "request", [], "any", false, false, false, 27), "locale", [], "any", false, false, false, 27)))) {
// line 28
$context["langArrayIndex"] = twig_get_attribute($this->env, $this->source, $context["loop"], "index0", [], "any", false, false, false, 28);
}
++$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['langCode'], $context['la'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 1
$this->parent = $this->loadTemplate("Frontend/base.html.twig", "Frontend/layout.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 32
public function block_seo($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", "seo"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "seo"));
// line 33
echo " ";
if ((array_key_exists("currentSection", $context) && !twig_test_empty((isset($context["currentSection"]) || array_key_exists("currentSection", $context) ? $context["currentSection"] : (function () { throw new RuntimeError('Variable "currentSection" does not exist.', 33, $this->source); })())))) {
// line 34
echo " ";
echo twig_include($this->env, $context, "Frontend/common/seoTags.html.twig");
echo "
";
} else {
// line 36
echo " ";
$this->displayParentBlock("seo", $context, $blocks);
echo "
";
}
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 40
public function block_body($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", "body"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 41
echo " ";
// line 42
echo " ";
$this->displayBlock('appcheck', $context, $blocks);
// line 53
echo "
";
// line 54
$this->displayBlock('content', $context, $blocks);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 42
public function block_appcheck($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", "appcheck"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "appcheck"));
// line 43
echo " ";
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["app"] ?? null), "request", [], "any", false, true, false, 43), "server", [], "any", false, true, false, 43), "get", [0 => "HTTP_X_REQUESTED_WITH"], "method", true, true, false, 43) && (0 === twig_compare(twig_get_attribute($this->env, $this->source, 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.', 43, $this->source); })()), "request", [], "any", false, false, false, 43), "server", [], "any", false, false, false, 43), "get", [0 => "HTTP_X_REQUESTED_WITH"], "method", false, false, false, 43), "com.rcdespanyol.app")))) {
// line 44
echo " ";
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.', 44, $this->source); })()), "session", [], "any", false, false, false, 44), "set", [0 => "foo", 1 => 0], "method", false, false, false, 44), "html", null, true);
echo "
";
} else {
// line 46
echo " ";
if ((((!twig_in_filter("Windows", twig_get_attribute($this->env, $this->source, 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.', 46, $this->source); })()), "request", [], "any", false, false, false, 46), "server", [], "any", false, false, false, 46), "get", [0 => "HTTP_USER_AGENT"], "method", false, false, false, 46)) && !twig_in_filter("Safari", twig_get_attribute($this->env, $this->source, 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.', 46, $this->source); })()), "request", [], "any", false, false, false, 46), "server", [], "any", false, false, false, 46), "get", [0 => "HTTP_USER_AGENT"], "method", false, false, false, 46))) && !twig_in_filter("Chrome", twig_get_attribute($this->env, $this->source, 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.', 46, $this->source); })()), "request", [], "any", false, false, false, 46), "server", [], "any", false, false, false, 46), "get", [0 => "HTTP_USER_AGENT"], "method", false, false, false, 46))) && !twig_in_filter("Firefox", twig_get_attribute($this->env, $this->source, 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.', 46, $this->source); })()), "request", [], "any", false, false, false, 46), "server", [], "any", false, false, false, 46), "get", [0 => "HTTP_USER_AGENT"], "method", false, false, false, 46)))) {
// line 47
echo " ";
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.', 47, $this->source); })()), "session", [], "any", false, false, false, 47), "set", [0 => "foo", 1 => 0], "method", false, false, false, 47), "html", null, true);
echo "
";
} else {
// line 49
echo " ";
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.', 49, $this->source); })()), "session", [], "any", false, false, false, 49), "set", [0 => "foo", 1 => 1], "method", false, false, false, 49), "html", null, true);
echo "
";
}
// line 51
echo " ";
}
// line 52
echo " ";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 54
public function block_content($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", "content"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 55
echo "
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "Frontend/layout.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 249 => 55, 239 => 54, 229 => 52, 226 => 51, 220 => 49, 214 => 47, 211 => 46, 205 => 44, 202 => 43, 192 => 42, 182 => 54, 179 => 53, 176 => 42, 174 => 41, 164 => 40, 150 => 36, 144 => 34, 141 => 33, 131 => 32, 120 => 1, 105 => 28, 103 => 27, 86 => 26, 84 => 25, 81 => 22, 79 => 21, 77 => 20, 75 => 19, 73 => 18, 71 => 17, 69 => 16, 67 => 15, 65 => 13, 63 => 12, 61 => 9, 59 => 8, 57 => 7, 55 => 6, 53 => 5, 51 => 3, 38 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'Frontend/base.html.twig' %}
{% set aTeams = navHelper.getTeams() %}
{% set aNewsCategs = navHelper.getNewsCategories() %}
{% set aSponsors = navHelper.getSponsors() %}
{% set aHeaderSponsors = navHelper.getHeaderSponsors() %}
{% set audio = navHelper.getAudio() %}
{% set fromChina = navHelper.clientInChina() %}
{# {% set fromChina = true %} #}
{% set currentYear = 'now'|date('Y') %}
{% set aLangsUrls = navHelper.getUrlsForLanguageSelector() %}
{% set ticketsUrl = 'https://tickets.rcdespanyol.com/index.php/en/entradas-en' %}
{% set becomeMember = 'https://tickets.rcdespanyol.com/index.php/en/' %}
{% if app.request.locale == 'es' %}
{% set ticketsUrl = 'https://tickets.rcdespanyol.com/index.php/es/entradas-es' %}
{% set becomeMember = 'https://tickets.rcdespanyol.com/index.php/es/' %}
{% elseif app.request.locale == 'ca' %}
{% set ticketsUrl = 'https://tickets.rcdespanyol.com/index.php/ca/entrades' %}
{% set becomeMember = 'https://tickets.rcdespanyol.com/index.php/ca/' %}
{% endif %}
{% set langArrayIndex = 0 %}
{% for langCode, la in langs %}
{% if langCode == app.request.locale %}
{% set langArrayIndex = loop.index0 %}
{% endif %}
{% endfor %}
{% block seo %}
{% if currentSection is defined and currentSection is not empty %}
{{ include('Frontend/common/seoTags.html.twig') }}
{% else %}
{{ parent() }}
{% endif %}
{% endblock %}
{% block body %}
{# dump(fromChina) #}
{% block appcheck %}
{% if app.request.server.get('HTTP_X_REQUESTED_WITH') is defined and app.request.server.get('HTTP_X_REQUESTED_WITH') == 'com.rcdespanyol.app' %}
{{ app.session.set('foo', 0) }}
{% else %}
{% if 'Windows' not in app.request.server.get('HTTP_USER_AGENT') and 'Safari' not in app.request.server.get('HTTP_USER_AGENT') and 'Chrome' not in app.request.server.get('HTTP_USER_AGENT') and 'Firefox' not in app.request.server.get('HTTP_USER_AGENT') %}
{{ app.session.set('foo', 0) }}
{% else %}
{{ app.session.set('foo', 1) }}
{% endif %}
{% endif %}
{% endblock %}
{% block content %}
{% endblock %}
{% endblock %}
", "Frontend/layout.html.twig", "/var/www/espanyol/templates/Frontend/layout.html.twig");
}
}