var/cache/dev/twig/54/54d3218121c5e0ec6a430fbb8ea0a90e938181000c67e3e4cce0eaa1439141c0.php line 33

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* include/nav/_landing-page-nav.html.twig */
  14. class __TwigTemplate_cbe511c26c5e7c1254c1e93615378af4daf2001bf5526d50fea5482b864ca5db extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source = $this->getSourceContext();
  22.         $this->parent = false;
  23.         $this->blocks = [
  24.         ];
  25.     }
  26.     protected function doDisplay(array $context, array $blocks = [])
  27.     {
  28.         $macros = $this->macros;
  29.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "include/nav/_landing-page-nav.html.twig"));
  31.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "include/nav/_landing-page-nav.html.twig"));
  33.         // line 1
  34.         echo "<nav class=\"landing-page-nav\">
  35. \t";
  36.         // line 2
  37.         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)) {
  38.             // line 3
  39.             echo "\t\t<p>User:
  40. \t\t\t";
  41.             // line 4
  42.             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);
  43.             echo "</p>
  44. \t\t<a href=\"";
  45.             // line 5
  46.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("shopping");
  47.             echo "\">Shop</a>
  48. \t\t<br>
  49. \t\t<a href=\"";
  50.             // line 7
  51.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("shopping_cart_index");
  52.             echo "\">Cart</a>
  53. \t\t<br>
  54. \t\t";
  55.             // line 9
  56.             $context['_parent'] = $context;
  57.             $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));
  58.             foreach ($context['_seq'] as $context["_key"] => $context["role"]) {
  59.                 // line 10
  60.                 echo "\t\t\t";
  61.                 if ((0 === twig_compare($context["role"], "ROLE_ADMIN"))) {
  62.                     // line 11
  63.                     echo "\t\t\t\t<a href=\"";
  64.                     echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin");
  65.                     echo "\">Admin</a>
  66. \t\t\t\t<br>
  67. \t\t\t";
  68.                 }
  69.                 // line 14
  70.                 echo "\t\t";
  71.             }
  72.             $_parent = $context['_parent'];
  73.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['role'], $context['_parent'], $context['loop']);
  74.             $context = array_intersect_key($context, $_parent) + $_parent;
  75.             // line 15
  76.             echo "\t\t<a href=\"";
  77.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_logout");
  78.             echo "\">Logout</a>
  79. \t";
  80.         } else {
  81.             // line 17
  82.             echo "\t\t<a href=\"";
  83.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_login");
  84.             echo "\">Login</a>
  85. \t";
  86.         }
  87.         // line 19
  88.         echo "</nav>
  89. ";
  90.         
  91.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  92.         
  93.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  94.     }
  95.     public function getTemplateName()
  96.     {
  97.         return "include/nav/_landing-page-nav.html.twig";
  98.     }
  99.     public function isTraitable()
  100.     {
  101.         return false;
  102.     }
  103.     public function getDebugInfo()
  104.     {
  105.         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,);
  106.     }
  107.     public function getSourceContext()
  108.     {
  109.         return new Source("<nav class=\"landing-page-nav\">
  110. \t{% if app.user %}
  111. \t\t<p>User:
  112. \t\t\t{{ app.user.firstname }}</p>
  113. \t\t<a href=\"{{ path('shopping') }}\">Shop</a>
  114. \t\t<br>
  115. \t\t<a href=\"{{ path('shopping_cart_index') }}\">Cart</a>
  116. \t\t<br>
  117. \t\t{% for role in app.user.roles %}
  118. \t\t\t{% if role == \"ROLE_ADMIN\" %}
  119. \t\t\t\t<a href=\"{{ path('admin') }}\">Admin</a>
  120. \t\t\t\t<br>
  121. \t\t\t{% endif %}
  122. \t\t{% endfor %}
  123. \t\t<a href=\"{{ path('app_logout') }}\">Logout</a>
  124. \t{% else %}
  125. \t\t<a href=\"{{ path('app_login') }}\">Login</a>
  126. \t{% endif %}
  127. </nav>
  128. ", "include/nav/_landing-page-nav.html.twig", "/home/capa5744/public_html/projetecommerce/e-com/templates/include/nav/_landing-page-nav.html.twig");
  129.     }
  130. }