Lines Matching refs:twig

21     $twig = create_your_twig_env();
23 $deprecations = new \Twig\Util\DeprecationCollector($twig);
114 and ``.../templates/default`` in this order. The ``page.twig`` template,
119 {# page.twig #}
120 {% extends "layout.twig" %}
131 {# page.twig in .../templates/mysite #}
132 {% extends "page.twig" %} {# from .../templates/default #}
147 {# page.twig in .../templates/mysite #}
148 {% extends "default/page.twig" %} {# from .../templates #}
164 $twig = new \Twig\Environment();
166 $lexer = new \Twig\Lexer($twig, [
172 $twig->setLexer($lexer);
178 $lexer = new \Twig\Lexer($twig, [
185 $lexer = new \Twig\Lexer($twig, [
192 $lexer = new \Twig\Lexer($twig, [
281 $twig->registerUndefinedFunctionCallback(function ($name) {
309 $twig->parse($twig->tokenize(new \Twig\Source($template)));
321 $twig->parse($twig->tokenize(new \Twig\Source($template, $file->getFilename(), $file)));
348 $twig = new \Twig\Environment($loader, [
408 {% extends "base.twig" %}
412 …TO templates (name, source, last_modified) VALUES (?, ?, ?)')->execute(['base.twig', $base, $now]);
413 … templates (name, source, last_modified) VALUES (?, ?, ?)')->execute(['index.twig', $index, $now]);
416 ``base.twig`` and ``index.twig``.
480 $twig = new \Twig\Environment($loader);
482 echo $twig->render('index.twig', ['name' => 'Fabien']);
500 'base.twig' => '{% block content %}{% endblock %}',
504 $twig = new \Twig\Environment($loader);
506 echo $twig->render('index.twig', ['name' => 'Fabien']);
508 Now that the ``base.twig`` templates is defined in an array loader, you can
525 $template = $twig->createTemplate('hello {{ name }}');