Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Views Bootstrap 5.5.4 — Minor update available for module views_bootstrap (5.5.4). Release: Rightup theme 1.0.3 — Minor update available for theme vartheme_bs5_rightup (1.0.3). Release: CommentOn 1.0.6 — Minor update available for module commenton (1.0.6). Release: ChatGPT Ads 1.0.3 — Minor update available for module chatgpt_ads (1.0.3). Release: Opensolr Search 5.1.3 — Minor update available for module opensolr_search (5.1.3). Release: ServiceM8 Webform Integration 1.2.1 — Minor update available for module servicem8_webform (1.2.1). Release: PostfixAdmin 1.0.0 — Initial release available for module postfix_admin (1.0.0)! Release: ip_analyser 1.0.3 — Minor update available for module ip_analyser (1.0.3). Module Revived: Swagger-PHP OpenAPI 3 documentation generator 1.0.0 — Module swagger_php updated after 10 months of inactivity (1.0.0). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage.

Twig Tools

Security covered Drupal 9–11

Part of the Twig ecosystem · 26 projects

View on drupal.org

The Twig Tools module provides additional Twig filters and functions.

Current Filters:

Sanitization Filters:

clean_class_array
Sanitizes all strings in an array for use as valid class names.
array_unique
Filters all non-unique values from an array.
remove_empty
Removes all falsy values from an array.
scrub_class_array
Runs an array through all three Twig Tools sanitization filters.

Conversion Filters:

boolean
Returns the boolean value of a passed variable.
integer
Returns the integer value of a passed variable.
float
Returns the float value of a passed variable.
string
Returns the string value of a passed variable.
md5
Returns the md5 hash value of a passed variable.
json_decode
Decodes a JSON string into an object or array.
date_from_format
Converts a datetime string between two specified formats.
base64_encode
Encodes a base64 string.
base64_decode
Decodes a base64 string.

Color Filters:

rgb_to_hex
Returns the hexadecimal color value of an RGB array of values.
css_rgb_to_hex
Returns the hexadecimal color value of a passed CSS RGB color string.
hex_to_rgb
Returns an array of equivalent RGB values of the passed hexadecimal color.
hex_to_css_rgb
Returns the CSS RGB string equivalent of the passed hexadecimal color.

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.

Activity

Tracked releases
2
Tracked since
Jan 2023
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Active

Releases

Version Type Core Release date
2.1.0 Stable 9–11 Sep 23, 2024
2.0.0 Stable Jan 18, 2023