<?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/components/header.html.twig */
class __TwigTemplate_acc64d801e405c8f5a3c014cba3c5b40 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_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "pages/components/header.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "pages/components/header.html.twig"));
// line 1
$context["selected"] = 0;
// line 2
$context["homelink"] = twig_get_attribute($this->env, $this->source, (isset($context["request"]) || array_key_exists("request", $context) ? $context["request"] : (function () { throw new RuntimeError('Variable "request" does not exist.', 2, $this->source); })()), "resourceLocatorPrefix", [], "any", false, false, false, 2);
// line 3
$context["loginlink"] = (((isset($context["appMediabankUrl"]) || array_key_exists("appMediabankUrl", $context) ? $context["appMediabankUrl"] : (function () { throw new RuntimeError('Variable "appMediabankUrl" does not exist.', 3, $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.', 3, $this->source); })()), "request", [], "any", false, false, false, 3), "locale", [], "any", false, false, false, 3)) . "/login");
// line 4
$context["loginImg"] = "data/img/menu_login.png";
// line 5
$context["carrentUser"] = "";
// line 7
if (array_key_exists("uuid", $context)) {
// line 8
$context["selected"] = $this->extensions['App\Twig\ComponentDataAdapterExtension']->adaptAttribute("header.selected", ["currentUuid" => (isset($context["uuid"]) || array_key_exists("uuid", $context) ? $context["uuid"] : (function () { throw new RuntimeError('Variable "uuid" does not exist.', 8, $this->source); })())]);
}
// line 10
if (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.', 10, $this->source); })()), "user", [], "any", false, false, false, 10)) {
// line 11
$context["carrentUser"] = 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); })()), "user", [], "any", false, false, false, 11), "username", [], "any", false, false, false, 11);
}
// line 13
echo "<modern-header
links=\"";
// line 14
echo twig_escape_filter($this->env, json_encode($this->extensions['App\Twig\ComponentDataAdapterExtension']->adaptAttribute("header.links", ["locale" => 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.', 14, $this->source); })()), "request", [], "any", false, false, false, 14), "locale", [], "any", false, false, false, 14)])), "html", null, true);
echo "\"
selected=\"";
// line 15
echo twig_escape_filter($this->env, (isset($context["selected"]) || array_key_exists("selected", $context) ? $context["selected"] : (function () { throw new RuntimeError('Variable "selected" does not exist.', 15, $this->source); })()), "html", null, true);
echo "\"
logo-link=\"";
// line 16
echo twig_escape_filter($this->env, json_encode(["url" => $this->extensions['Sulu\Bundle\WebsiteBundle\Twig\Content\ContentPathTwigExtension']->getContentRootPath(), "imageUrl" => "data/img/menu_logo.png"]), "html", null, true);
echo "\"
home-link=\"";
// line 17
echo twig_escape_filter($this->env, json_encode(["url" => (isset($context["homelink"]) || array_key_exists("homelink", $context) ? $context["homelink"] : (function () { throw new RuntimeError('Variable "homelink" does not exist.', 17, $this->source); })()), "imageUrl" => "data/img/menu_home.png"]), "html", null, true);
echo "\"
search-link=\"";
// line 18
echo twig_escape_filter($this->env, json_encode(["url" => "/", "imageUrl" => "data/img/menu_search.png"]), "html", null, true);
echo "\"
user-link=\"";
// line 19
echo twig_escape_filter($this->env, json_encode(["url" => (isset($context["loginlink"]) || array_key_exists("loginlink", $context) ? $context["loginlink"] : (function () { throw new RuntimeError('Variable "loginlink" does not exist.', 19, $this->source); })()), "imageUrl" => (isset($context["loginImg"]) || array_key_exists("loginImg", $context) ? $context["loginImg"] : (function () { throw new RuntimeError('Variable "loginImg" does not exist.', 19, $this->source); })())]), "html", null, true);
echo "\"
localizations=\"";
// line 20
echo twig_escape_filter($this->env, json_encode((isset($context["localizations"]) || array_key_exists("localizations", $context) ? $context["localizations"] : (function () { throw new RuntimeError('Variable "localizations" does not exist.', 20, $this->source); })())), "html", null, true);
echo "\"
carrent-language=\"";
// line 21
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["request"]) || array_key_exists("request", $context) ? $context["request"] : (function () { throw new RuntimeError('Variable "request" does not exist.', 21, $this->source); })()), "resourceLocatorPrefix", [], "any", false, false, false, 21), "html", null, true);
echo "\"
current-user=\"";
// line 22
echo twig_escape_filter($this->env, (isset($context["carrentUser"]) || array_key_exists("carrentUser", $context) ? $context["carrentUser"] : (function () { throw new RuntimeError('Variable "carrentUser" does not exist.', 22, $this->source); })()), "html", null, true);
echo "\"
social-media=\"";
// line 23
echo twig_escape_filter($this->env, json_encode($this->extensions['App\Twig\ComponentDataAdapterExtension']->adaptAttribute("header.social_media", ["areaKey" => "footerSocialMediaLinks"])), "html", null, true);
echo "\"
";
// line 24
$this->loadTemplate("pages/components/attributes/theme.html.twig", "pages/components/header.html.twig", 24)->display($context);
// line 25
echo " ";
$this->loadTemplate("pages/components/attributes/overlay.html.twig", "pages/components/header.html.twig", 25)->display($context);
// line 26
echo "></modern-header>";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "pages/components/header.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 111 => 26, 108 => 25, 106 => 24, 102 => 23, 98 => 22, 94 => 21, 90 => 20, 86 => 19, 82 => 18, 78 => 17, 74 => 16, 70 => 15, 66 => 14, 63 => 13, 60 => 11, 58 => 10, 55 => 8, 53 => 7, 51 => 5, 49 => 4, 47 => 3, 45 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% set selected = 0 %}
{% set homelink = request.resourceLocatorPrefix %}
{% set loginlink = appMediabankUrl ~ app.request.locale ~ '/login' %}
{% set loginImg = 'data/img/menu_login.png' %}
{% set carrentUser = '' %}
{%- if uuid is defined -%}
{% set selected = adapt_attribute('header.selected', {'currentUuid' : uuid}) %}
{%- endif -%}
{%- if app.user -%}
{% set carrentUser = app.user.username %}
{%- endif -%}
<modern-header
links=\"{{ adapt_attribute('header.links', {'locale':app.request.locale}) | json_encode }}\"
selected=\"{{ selected }}\"
logo-link=\"{{ { 'url': sulu_content_root_path(), 'imageUrl': 'data/img/menu_logo.png' } | json_encode }}\"
home-link=\"{{ { 'url': homelink, 'imageUrl': 'data/img/menu_home.png' } | json_encode }}\"
search-link=\"{{ { 'url': '/', 'imageUrl': 'data/img/menu_search.png' } | json_encode }}\"
user-link=\"{{ { 'url': loginlink, 'imageUrl': loginImg } | json_encode }}\"
localizations=\"{{localizations | json_encode }}\"
carrent-language=\"{{request.resourceLocatorPrefix}}\"
current-user=\"{{carrentUser}}\"
social-media=\"{{ adapt_attribute('header.social_media', {'areaKey': 'footerSocialMediaLinks'}) | json_encode }}\"
{% include 'pages/components/attributes/theme.html.twig' %}
{% include 'pages/components/attributes/overlay.html.twig' %}
></modern-header>", "pages/components/header.html.twig", "/var/www/modern-expo.com/templates/pages/components/header.html.twig");
}
}