- last update
over 1 year ago 27 pass
Some time, we are creating different workflow but some are sharing the same logic and could share the same guards.
Ex: workflows that contains l10n steps (content validation->translation->validation of the translation)
I would be happy to have only one guard for all those workflows:
-Checking everything is translated to allow to validate translations
-Checking everything is validated before being published
-and so on
Note that, I use the same transition id and state id for the "shared transition logic" to ease the coding
Allow to have multiple workflows asigned to the group
service tag in the guard service definition
(with BC compatibility)
mymodule.transition_l10n_guard:
class: Drupal\mymodule\Guard\L10NGuard
tags:
- { name: state_machine.guard, group: [workflow1, workflow2] }
Of course, I can use the generic guard (without the group
service tag, but it will fire every time...
Needs review
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.