[Workflow] Added more events to the announce function
This commit is contained in:
parent
59094b406a
commit
c5042f35e1
@ -259,6 +259,8 @@ class WorkflowTest extends TestCase
|
||||
'workflow.workflow_name.enter.b',
|
||||
'workflow.workflow_name.enter.c',
|
||||
// Following events are fired because of announce() method
|
||||
'workflow.announce',
|
||||
'workflow.workflow_name.announce',
|
||||
'workflow.guard',
|
||||
'workflow.workflow_name.guard',
|
||||
'workflow.workflow_name.guard.t2',
|
||||
|
@ -282,6 +282,9 @@ class Workflow
|
||||
|
||||
$event = new Event($subject, $marking, $initialTransition);
|
||||
|
||||
$this->dispatcher->dispatch('workflow.announce', $event);
|
||||
$this->dispatcher->dispatch(sprintf('workflow.%s.announce', $this->name), $event);
|
||||
|
||||
foreach ($this->getEnabledTransitions($subject) as $transition) {
|
||||
$this->dispatcher->dispatch(sprintf('workflow.%s.announce.%s', $this->name, $transition->getName()), $event);
|
||||
}
|
||||
|
Reference in New Issue
Block a user