-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Since Twing has no mechanism for unregistering extensions, and since attempting to register an extension with the same name as one that's already been registered throws an error, it would be nice to be able to specify extensions that you don't want drupal-twig-extensions to register.
For example, right now the create_attribute() function that this package registers isn't useful in Twing, and consequently I'd like to register my own custom create_attribute(). But because of the limitations mentioned above, I find myself stuck: once this package registers create_attribute(), I can't unregister it, and I can't supply an override. If I could instruct drupal-twig-extensions not to register create_attribute(), I could get around this problem.
I envision something like:
addDrupalExtensions(twigOrTwingEnvironment, { exclude: ['create_attribute'] })