Allow for token replacement on action plugins that don't replace tokens on their own
Problem/Motivation
There may be action plugins, that are not applying Token replacement on their own, but where Tokens could be useful. One example is "Redirect to URL" (action_goto_action) provided by core. Since Tokens are a heart concept of ECA, we should provide a convenient solution that Tokens are being replaced also there.
Steps to reproduce
Proposed resolution
We have several options. Some of the could be:
- Let ECA contain its own, extended version of such an action that does support Tokens, e.g. for redirecting.
- Provide an On/Off Dropdown (or checkbox) "Enable Token preprocessing" on all actions via UI that would let the configuration array first being run through Token replacement, before it's getting passed to the action plugin to be instantiated. As this would be an optional thing, other actions wouldn't be affected and wouldn't get a possible performance bottleneck.
- Create a whitelist as service parameter, which contains action plugin IDs for where Token replacement should be applied on the configuration array.
Currently I'd prefer option 2, but that's just a guess.
Remaining tasks
Choose the solution path, implement and cover with a test.
User interface changes
API changes
Data model changes
Edited by drupalbot