APIv4 MessageTemplates & workflow_ids
My expectation is that using one of the apis I could do something like
MessageTemplate::get()->addSelect('workflow_id', '=', 'participant_confirm');
And it would retrieve it (avoiding any nasty joins per #1705) - However, I'm 'up against' the fact the workflow_ids were done in a really weird way.
The 'normal' design would be one option group for message templates & then we would have options against that for each defined workflow_template, with a component id as a filter & the value being meaningful.
Instead MessageTemplates break the option_group structure by using id as the value and using different option groups to separate by components.
I guess options are
- fix it - update all values to be equal to the ids in an upgrade script, define a normal pseudoconstant in the xml & switch code accross
- add a pseudoconstant that defines the join as it actually is This kinda says 'never gonna fix you up, never gonna let you down, never gonna turn around & standardise you'
- Add the correct values for the component ids to the option_values, add a new function for pseudoconstant callback that handles it - still aspire to fix properly one day.
It does depend a bit on #1705 and how much the api will or won't mask the underlying structure