Skip to content

Instantly share code, notes, and snippets.

@tvdijen
Created July 10, 2022 09:56
Show Gist options
  • Save tvdijen/fc1016fbaa3aeac5a2bd50dad2e73114 to your computer and use it in GitHub Desktop.
Save tvdijen/fc1016fbaa3aeac5a2bd50dad2e73114 to your computer and use it in GitHub Desktop.
An example of a compiled Twig Template
<?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;
/* logout.twig */
class __TwigTemplate_b929cada2eec23110755ea05047ba4c6e67882c0784a2cbf8e8c381eebc670ca extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context)
{
// line 2
return "base.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
// line 1
$context["pagetitle"] = $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Logged out");
// line 2
$this->parent = $this->loadTemplate("base.twig", "logout.twig", 2);
$this->parent->display($context, array_merge($this->blocks, $blocks));
}
// line 4
public function block_content($context, array $blocks = [])
{
$macros = $this->macros;
// line 5
echo " <h1>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Logged out"), "html", null, true);
echo "</h1>
<br>
<h3>";
// line 7
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("You have been logged out.", [], "messages");
echo "</h3>
<br>
";
// line 9
if ((isset($context["text"]) || array_key_exists("text", $context) ? $context["text"] : (function () { throw new RuntimeError('Variable "text" does not exist.', 9, $this->source); })())) {
// line 10
echo " <p><a href=\"";
echo twig_escape_filter($this->env, (isset($context["link"]) || array_key_exists("link", $context) ? $context["link"] : (function () { throw new RuntimeError('Variable "link" does not exist.', 10, $this->source); })()), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans((isset($context["text"]) || array_key_exists("text", $context) ? $context["text"] : (function () { throw new RuntimeError('Variable "text" does not exist.', 10, $this->source); })())), "html", null, true);
echo "</a></p>
";
}
}
public function getTemplateName()
{
return "logout.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 66 => 10, 64 => 9, 59 => 7, 53 => 5, 49 => 4, 44 => 2, 42 => 1, 35 => 2,);
}
public function getSourceContext()
{
return new Source("", "logout.twig", "/apps/development/simplesamlphp/templates/logout.twig");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment