- Issue created by @super_romeo
- 🇮🇱Israel jsacksick
Right, but you can add logic to your form to check the bundle?
- 🇷🇸Serbia super_romeo Belgrade
Absolutely.
But what will happen if 2 independent modules want to define a confirmation form for same entity type?For example, in module1.module:
/** * Implements hook_entity_type_alter(). */ function module1_entity_type_alter(array &$entity_types) { ... $type->setLinkTemplate('state-transition-form', '/node/{node}/{field_name}/{transition_id}'); $type->setFormClass('state-transition-confirm', RequestConfirmForm1::class); }
For example, in module2.module:
/** * Implements hook_entity_type_alter(). */ function module2_entity_type_alter(array &$entity_types) { ... $type->setLinkTemplate('state-transition-form', '/node/{node}/{field_name}/{transition_id}'); $type->setFormClass('state-transition-confirm', RequestConfirmForm2::class); }
state-transition-confirm
will be overwritten. - 🇮🇱Israel jsacksick
Yes and? There are always solutions to ensure your override comes last? Via a
hook_module_implements_alter()
for example? - Status changed to Closed: works as designed
over 1 year ago 2:39pm 30 June 2023