var/cache/dev/twig/57/57fe8f4a99270386cb9a9ebdba73c1e5.php line 44

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* home/index.html.twig */
  16. class __TwigTemplate_17c4ef7d16a3fc6ff3ea4847bc4e3d05 extends Template
  17. {
  18.     private Source $source;
  19.     /**
  20.      * @var array<string, Template>
  21.      */
  22.     private array $macros = [];
  23.     public function __construct(Environment $env)
  24.     {
  25.         parent::__construct($env);
  26.         $this->source $this->getSourceContext();
  27.         $this->blocks = [
  28.             'title' => [$this'block_title'],
  29.             'body' => [$this'block_body'],
  30.         ];
  31.     }
  32.     protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  33.     {
  34.         // line 1
  35.         return "base.html.twig";
  36.     }
  37.     protected function doDisplay(array $context, array $blocks = []): iterable
  38.     {
  39.         $macros $this->macros;
  40.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  41.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""home/index.html.twig"));
  42.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  43.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""home/index.html.twig"));
  44.         $this->parent $this->load("base.html.twig"1);
  45.         yield from $this->parent->unwrap()->yield($contextarray_merge($this->blocks$blocks));
  46.         
  47.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  48.         
  49.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  50.     }
  51.     // line 3
  52.     /**
  53.      * @return iterable<null|scalar|\Stringable>
  54.      */
  55.     public function block_title(array $context, array $blocks = []): iterable
  56.     {
  57.         $macros $this->macros;
  58.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  59.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  60.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  61.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  62.         yield "Gallery - Home";
  63.         
  64.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  65.         
  66.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  67.         yield from [];
  68.     }
  69.     // line 5
  70.     /**
  71.      * @return iterable<null|scalar|\Stringable>
  72.      */
  73.     public function block_body(array $context, array $blocks = []): iterable
  74.     {
  75.         $macros $this->macros;
  76.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  77.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  78.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  79.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  80.         // line 6
  81.         yield "<style>
  82.     .example-wrapper { margin: 1em auto; max-width: 800px; width: 95%; font: 18px/1.5 sans-serif; }
  83.     .nav-links { list-style: none; padding: 0; }
  84.     .nav-links li { display: inline; margin-right: 15px; }
  85. </style>
  86. <div class=\"example-wrapper\">
  87.     <h1>Welcome to Gallery</h1>
  88.     <nav>
  89.         <ul class=\"nav-links\">
  90.             ";
  91.         // line 17
  92.         if ((($tmp CoreExtension::getAttribute($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); })()), "user", [], "any"falsefalsefalse17)) && $tmp instanceof Markup ? (string) $tmp $tmp)) {
  93.             // line 18
  94.             yield "                <li>Logged in as: ";
  95.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'18$this->source); })()), "user", [], "any"falsefalsefalse18), "email", [], "any"falsefalsefalse18), "html"nulltrue);
  96.             yield "</li>
  97.                 <li><a href=\"";
  98.             // line 19
  99.             yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_logout");
  100.             yield "\">Logout</a></li>
  101.             ";
  102.         } else {
  103.             // line 21
  104.             yield "                <li><a href=\"";
  105.             yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_login");
  106.             yield "\">Login</a></li>
  107.                 <li><a href=\"";
  108.             // line 22
  109.             yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_register");
  110.             yield "\">Register</a></li>
  111.             ";
  112.         }
  113.         // line 24
  114.         yield "        </ul>
  115.     </nav>
  116.     ";
  117.         // line 27
  118.         if ((($tmp CoreExtension::getAttribute($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); })()), "user", [], "any"falsefalsefalse27)) && $tmp instanceof Markup ? (string) $tmp $tmp)) {
  119.             // line 28
  120.             yield "        <p>You are successfully authenticated!</p>
  121.     ";
  122.         } else {
  123.             // line 30
  124.             yield "        <p>Please login or register to continue.</p>
  125.     ";
  126.         }
  127.         // line 32
  128.         yield "</div>
  129. ";
  130.         
  131.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  132.         
  133.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  134.         yield from [];
  135.     }
  136.     /**
  137.      * @codeCoverageIgnore
  138.      */
  139.     public function getTemplateName(): string
  140.     {
  141.         return "home/index.html.twig";
  142.     }
  143.     /**
  144.      * @codeCoverageIgnore
  145.      */
  146.     public function isTraitable(): bool
  147.     {
  148.         return false;
  149.     }
  150.     /**
  151.      * @codeCoverageIgnore
  152.      */
  153.     public function getDebugInfo(): array
  154.     {
  155.         return array (  150 => 32,  146 => 30,  142 => 28,  140 => 27,  135 => 24,  130 => 22,  125 => 21,  120 => 19,  115 => 18,  113 => 17,  100 => 6,  87 => 5,  64 => 3,  41 => 1,);
  156.     }
  157.     public function getSourceContext(): Source
  158.     {
  159.         return new Source("{% extends 'base.html.twig' %}
  160. {% block title %}Gallery - Home{% endblock %}
  161. {% block body %}
  162. <style>
  163.     .example-wrapper { margin: 1em auto; max-width: 800px; width: 95%; font: 18px/1.5 sans-serif; }
  164.     .nav-links { list-style: none; padding: 0; }
  165.     .nav-links li { display: inline; margin-right: 15px; }
  166. </style>
  167. <div class=\"example-wrapper\">
  168.     <h1>Welcome to Gallery</h1>
  169.     <nav>
  170.         <ul class=\"nav-links\">
  171.             {% if app.user %}
  172.                 <li>Logged in as: {{ app.user.email }}</li>
  173.                 <li><a href=\"{{ path('app_logout') }}\">Logout</a></li>
  174.             {% else %}
  175.                 <li><a href=\"{{ path('app_login') }}\">Login</a></li>
  176.                 <li><a href=\"{{ path('app_register') }}\">Register</a></li>
  177.             {% endif %}
  178.         </ul>
  179.     </nav>
  180.     {% if app.user %}
  181.         <p>You are successfully authenticated!</p>
  182.     {% else %}
  183.         <p>Please login or register to continue.</p>
  184.     {% endif %}
  185. </div>
  186. {% endblock %}
  187. ""home/index.html.twig""/var/www/html/dev/gallery/templates/home/index.html.twig");
  188.     }
  189. }