$this->dispatcher->
dispatch($event,
sprintf('workflow.%s.transition',
$this->name
));
$this->dispatcher->
dispatch($event,
sprintf('workflow.%s.transition.%s',
$this->name,
$transition->
getName()));
return $event->
getContext();
} private function enter(object
$subject, Transition
$transition, Marking
$marking, array
$context): void
{ $places =
$transition->
getTos();
if ($this->
shouldDispatchEvent(WorkflowEvents::ENTER,
$context)) { $event =
new EnterEvent($subject,
$marking,
$transition,
$this,
$context);
$this->dispatcher->
dispatch($event, WorkflowEvents::ENTER
);
$this->dispatcher->
dispatch($event,
sprintf('workflow.%s.enter',
$this->name
));
foreach ($places as $place) { $this->dispatcher->
dispatch($event,
sprintf('workflow.%s.enter.%s',
$this->name,
$place));
} } foreach ($places as $place) { $marking->
mark($place);
}