<?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;
/* include/nav/_landing-page-nav.html.twig */
class __TwigTemplate_cbe511c26c5e7c1254c1e93615378af4daf2001bf5526d50fea5482b864ca5db 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", "include/nav/_landing-page-nav.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "include/nav/_landing-page-nav.html.twig"));
// line 1
echo "<nav class=\"landing-page-nav\">
\t";
// line 2
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.', 2, $this->source); })()), "user", [], "any", false, false, false, 2)) {
// line 3
echo "\t\t<p>User:
\t\t\t";
// line 4
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.', 4, $this->source); })()), "user", [], "any", false, false, false, 4), "firstname", [], "any", false, false, false, 4), "html", null, true);
echo "</p>
\t\t<a href=\"";
// line 5
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("shopping");
echo "\">Shop</a>
\t\t<br>
\t\t<a href=\"";
// line 7
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("shopping_cart_index");
echo "\">Cart</a>
\t\t<br>
\t\t";
// line 9
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(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.', 9, $this->source); })()), "user", [], "any", false, false, false, 9), "roles", [], "any", false, false, false, 9));
foreach ($context['_seq'] as $context["_key"] => $context["role"]) {
// line 10
echo "\t\t\t";
if ((0 === twig_compare($context["role"], "ROLE_ADMIN"))) {
// line 11
echo "\t\t\t\t<a href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin");
echo "\">Admin</a>
\t\t\t\t<br>
\t\t\t";
}
// line 14
echo "\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['role'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 15
echo "\t\t<a href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_logout");
echo "\">Logout</a>
\t";
} else {
// line 17
echo "\t\t<a href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_login");
echo "\">Login</a>
\t";
}
// line 19
echo "</nav>
";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "include/nav/_landing-page-nav.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 97 => 19, 91 => 17, 85 => 15, 79 => 14, 72 => 11, 69 => 10, 65 => 9, 60 => 7, 55 => 5, 51 => 4, 48 => 3, 46 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("<nav class=\"landing-page-nav\">
\t{% if app.user %}
\t\t<p>User:
\t\t\t{{ app.user.firstname }}</p>
\t\t<a href=\"{{ path('shopping') }}\">Shop</a>
\t\t<br>
\t\t<a href=\"{{ path('shopping_cart_index') }}\">Cart</a>
\t\t<br>
\t\t{% for role in app.user.roles %}
\t\t\t{% if role == \"ROLE_ADMIN\" %}
\t\t\t\t<a href=\"{{ path('admin') }}\">Admin</a>
\t\t\t\t<br>
\t\t\t{% endif %}
\t\t{% endfor %}
\t\t<a href=\"{{ path('app_logout') }}\">Logout</a>
\t{% else %}
\t\t<a href=\"{{ path('app_login') }}\">Login</a>
\t{% endif %}
</nav>
", "include/nav/_landing-page-nav.html.twig", "/home/capa5744/public_html/projetecommerce/e-com/templates/include/nav/_landing-page-nav.html.twig");
}
}