function workbench_email_workflow_edit_builder in Workbench Email 8
Same name and namespace in other branches
- 2.x workbench_email.module \workbench_email_workflow_edit_builder()
Entity builder for the workflow form edit form with third party options.
See also
workbench_email_form_workflow_transition_edit_form_alter()
workbench_email_form_workflow_transition_add_form_alter()
2 string references to 'workbench_email_workflow_edit_builder'
- workbench_email_form_workflow_transition_add_form_alter in ./
workbench_email.module - Implements hook_form_FORM_ID_alter() for workflow_transition_add_form.
- workbench_email_form_workflow_transition_edit_form_alter in ./
workbench_email.module - Implements hook_form_FORM_ID_alter() for workflow_transition_edit_form.
File
- ./
workbench_email.module, line 112 - Provides main module functions.
Code
function workbench_email_workflow_edit_builder($entity_type, ConfigEntityInterface $workflow, &$form, FormStateInterface $form_state) {
$transition_settings = $workflow
->getThirdPartySetting('workbench_email', 'workbench_email_templates', []);
$transition_settings[$form_state
->getValue('id')] = array_filter($form_state
->getValue('workbench_email_templates'));
$workflow
->setThirdPartySetting('workbench_email', 'workbench_email_templates', $transition_settings);
}