Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Summary
Provides a way for administrators to define email transitions and configurable email subject / messages between those transitions. Email transitions can be defined as when content moves from state to state. Based on those email transitions, configurable emails can be created / updated / deleted as the site admin see's fit.
Project URL
https://www.drupal.org/project/workbench_email
Where is the code?
https://www.drupal.org/project/workbench_email/git-instructions
https://github.com/larowlan/workbench_email
Estimated completion date
Unknown
Dependencies
Unknown
Who's doing the port?
Unknown
What help do they need?
Unknown
Comments
Comment #2
Marishka_ CreditAttribution: Marishka_ commentedComment #3
ramarajuk CreditAttribution: ramarajuk as a volunteer commentedporting the module to d8
Comment #4
agentrickardWith Workbench Moderation stable, here's what developers need to know.
* During EntityPresave, Workbench Moderation calculates the state transition. See \Drupal\workbench_moderation\EntityOperations::entityPresave().
* A new \Drupal\workbench_moderation\Event\WorkbenchModerationTransitionEvent is created and sent to an Event Dispatcher tagged workbench_moderation.state_transition.
* The WorkbenchModerationTransitionEvent object has public methods for getEntity(), getStateBefore(), and getStateAfter().
* Modules may act as desired by declaring an EventSubscriber that responds to WorkbenchModerationEvents::STATE_TRANSITION.
* Cancelling the transition is not allowed.
So for this module, an EventSubscriber that triggers the email service would be ideal.
Comment #5
agentrickardIf there is sandbox code anywhere, I'd be happy to review.
Comment #6
joebachana CreditAttribution: joebachana as a volunteer and at DPCI commented@ramarajuk please let me know how the port to D8 is going and if you need any help with it (coding, testing)
Comment #7
ramarajuk CreditAttribution: ramarajuk as a volunteer commented@joebachana got busy with other work and could not make any progress.
plan was to implement as follows
Create a a new service.
services:
workbench_email.config_subscriber:
class: Drupal\workbench_email\EventSubscriber\WorkbenchEventSubscriber
tags:
- { name: event_subscriber }
Create the subscriber classs
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Drupal\workbench_moderation\Event\WorkbenchModerationEvents;
class WorkbenchEventSubscriber implements EventSubscriberInterface {
static function getSubscribedEvents() {
$events[WorkbenchModerationEvents::STATE_TRANSITION][] = array('handleEmails');
return $events;
}
.......
.......
Comment #8
joebachana CreditAttribution: joebachana as a volunteer and at DPCI commented@ramarajuk sounds good (subject to @agentrickard feedback). When done please lmk and will be happy to help test
Comment #9
agentrickardThat looks exactly in line with what I was thinking. The real core of the module will be in the management User Interface for subscribing to emails.
Comment #10
larowlanWorking on this
Comment #11
larowlansticking the repo above
Comment #12
larowlanI consider the code in https://github.com/larowlan/workbench_email to be ready now.
See the README for screenshots and configuration instructions.
Happy to be maintainer of D8 branch if that helps.
Comment #13
larowlanWe have an alpha
Comment #14
agentrickardAs I learned in another issue, Alpha doesn't mean done for the purposes of this tracker.
Comment #15
camoa CreditAttribution: camoa at Acquia commentedThanks for the great work.
What are the blockers for an RC for this module?
Thanks
Comment #16
Wim Leershttps://www.drupal.org/project/workbench_email/releases/8.x-1.0
Comment #17
apaderno