Issue #3115445 by mherchel, Ratan Priya, jedihe, alexdmccabe, selvakumar-96, Neslee Canil Pinto, catch, joycehutch, gonssal, Daniel Korte, shashank5563, Luke.Leber, SKAUGHT: Add a new clean_unique_id Twig filter for Html::getUniqueId

merge-requests/4080/head
Lauri Eskola 2023-05-30 16:07:53 +03:00
parent 5406b836f7
commit 677faa7bde
No known key found for this signature in database
GPG Key ID: 382FC0F5B0DF53F8
1 changed files with 1 additions and 0 deletions

View File

@ -140,6 +140,7 @@ class TwigExtension extends AbstractExtension {
// CSS class and ID filters.
new TwigFilter('clean_class', '\Drupal\Component\Utility\Html::getClass'),
new TwigFilter('clean_id', '\Drupal\Component\Utility\Html::getId'),
new TwigFilter('clean_unique_id', '\Drupal\Component\Utility\Html::getUniqueId'),
new TwigFilter('add_class', [$this, 'addClass']),
new TwigFilter('set_attribute', [$this, 'setAttribute']),
// This filter will render a renderable array to use the string results.