This module was created to share code snippets for use in a presentation about building approval systems on top of Workflows in Drupal. This code will definitely not completely work without modification.
- Service To Get Transition Id When Saving Entity:
src/TransitionHelper.phptransition_helper.services.yml
- Removing or Modifying a Workflow Button
transition_helper.module
- Creating a mail message
snippets/Message Stack/MessageCreator.php-- A sample method for creating, populating, and sending an email message with the Message stack.
- AJAX Dialog
snippets/AJAX Dialog/dialog.routing.ymlThe routing file to define the controller which responds to the AJAX triggersnippets/AJAX Dialog/src/Form/ApprovalForm.phpThe Original form with an AJAX trigger on the reject buttonsnippets/AJAX Dialog/src/Form/ModalForm.phpThe Modal form served by the controller.snippets/AJAX Dialog/src/Controller/ModalFormApprovalsController.phpThe controller