Twig String Extension
Part of the Twig ecosystem · 43 projects
This module allows Drupal to use the Symfony Unicode String library within Twig templates. This provides enhanced string manipulation capabilities directly in your templates. To enable this, you need to configure allowed classes in your Drupal settings file.
Adds support for the Twig String Extension library
Symfony Unicode String
In order to access the Symfony\Component\String\UnicodeString class in twig, you need to add it as an allowed class in your settings.php with the twig_sandbox_allowed_classes setting. For example:
$settings['twig_sandbox_allowed_classes'] = [
'Symfony\Component\String\UnicodeString',
'Drupal\Core\Template\Attribute',
];
See more on how this is processed in the TwigSandboxPolicy.
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
More in the Twig ecosystem
Most installed first