function TwigSandboxPolicy::getMethodsAllowedOnAllObjects
Gets the list of allowed methods on all objects.
Return value
string[] The list of allowed methods on all objects.
2 calls to TwigSandboxPolicy::getMethodsAllowedOnAllObjects()
- TwigExtension::getNodeVisitors in core/
lib/ Drupal/ Core/ Template/ TwigExtension.php - Returns the node visitor instances to add to the existing list.
- TwigSandboxPolicy::__construct in core/
lib/ Drupal/ Core/ Template/ TwigSandboxPolicy.php - Constructs a new TwigSandboxPolicy object.
File
-
core/
lib/ Drupal/ Core/ Template/ TwigSandboxPolicy.php, line 113
Class
- TwigSandboxPolicy
- Default sandbox policy for Twig templates.
Namespace
Drupal\Core\TemplateCode
public static function getMethodsAllowedOnAllObjects() : array {
return Settings::get('twig_sandbox_allowed_methods', [
// Only allow idempotent methods.
'id',
'label',
'bundle',
'get',
'__toString',
'toString',
]);
}