TwigSandboxPolicy::checkSecurity

public TwigSandboxPolicy::checkSecurity($tags, $filters, $functions) Overrides Twig_Sandbox_SecurityPolicyInterface::checkSecurity File core/lib/Drupal/Core/Template/TwigSandboxPolicy.php, line 69 Class TwigSandboxPolicy Default sandbox policy for Twig templates. Namespace Drupal\Core\Template Code public function checkSecurity($tags, $filters, $functions) { }

TwigSandboxPolicy::__construct

public TwigSandboxPolicy::__construct() Constructs a new TwigSandboxPolicy object. File core/lib/Drupal/Core/Template/TwigSandboxPolicy.php, line 37 Class TwigSandboxPolicy Default sandbox policy for Twig templates. Namespace Drupal\Core\Template Code public function __construct() { // Allow settings.php to override our default whitelisted classes, methods, // and prefixes. $whitelisted_classes = Settings::get('twig_sandbox_whitelisted_classes', [ // Allow any operations on t

TwigTransTokenParser

A class that defines the Twig 'trans' token parser for Drupal. The token parser converts a token stream created from template source code into an Abstract Syntax Tree (AST). The AST will later be compiled into PHP code usable for runtime execution of the template. Hierarchy class \Twig_TokenParser implements \Twig_TokenParserInterface class \Drupal\Core\Template\TwigTransTokenParser See also \Twig_TokenParser http://twig.sensiolabs.org/doc/extensions/i18n.html https://github.com/fabpot/Twi

TwigTransTokenParser::checkTransString

protected TwigTransTokenParser::checkTransString(\Twig_Node $body, $lineno) Ensure that any nodes that are parsed are only of allowed types. Parameters \Twig_Node $body: The expression to check. int $lineno: The source line. Throws \Twig_Error_Syntax File core/lib/Drupal/Core/Template/TwigTransTokenParser.php, line 86 Class TwigTransTokenParser A class that defines the Twig 'trans' token parser for Drupal. Namespace Drupal\Core\Template Code protected function checkTransString(\Twig_

TwigTransTokenParser::decideForEnd

public TwigTransTokenParser::decideForEnd($token) Detect the end of a 'trans' tag. File core/lib/Drupal/Core/Template/TwigTransTokenParser.php, line 65 Class TwigTransTokenParser A class that defines the Twig 'trans' token parser for Drupal. Namespace Drupal\Core\Template Code public function decideForEnd($token) { return $token->test('endtrans'); }

TwigTransTokenParser::decideForFork

public TwigTransTokenParser::decideForFork($token) Detect a 'plural' switch or the end of a 'trans' tag. File core/lib/Drupal/Core/Template/TwigTransTokenParser.php, line 58 Class TwigTransTokenParser A class that defines the Twig 'trans' token parser for Drupal. Namespace Drupal\Core\Template Code public function decideForFork($token) { return $token->test(array('plural', 'endtrans')); }

TwigTransTokenParser::getTag

public TwigTransTokenParser::getTag() File core/lib/Drupal/Core/Template/TwigTransTokenParser.php, line 72 Class TwigTransTokenParser A class that defines the Twig 'trans' token parser for Drupal. Namespace Drupal\Core\Template Code public function getTag() { return 'trans'; }

TwigTransTokenParser::parse

public TwigTransTokenParser::parse(\Twig_Token $token) File core/lib/Drupal/Core/Template/TwigTransTokenParser.php, line 21 Class TwigTransTokenParser A class that defines the Twig 'trans' token parser for Drupal. Namespace Drupal\Core\Template Code public function parse(\Twig_Token $token) { $lineno = $token->getLine(); $stream = $this->parser->getStream(); $body = NULL; $options = NULL; $count = NULL; $plural = NULL; if (!$stream->test(\Twig_Token::BLOCK_EN

twig_extension

twig_extension() Implements hook_extension(). File core/themes/engines/twig/twig.engine, line 24 Handles integration of Twig templates with the Drupal theme system. Code function twig_extension() { return '.html.twig'; }

twig_render_template

twig_render_template($template_file, array $variables) Implements hook_render_template(). Renders a Twig template. If the Twig debug setting is enabled, HTML comments including the theme hook and template file name suggestions will surround the template markup. Parameters string $template_file: The file name of the template to render. array $variables: A keyed array of variables that will appear in the output. Return value string|\Drupal\Component\Render\MarkupInterface The output generated b