foreach ($places as $place) { $marking->
unmark($place);
} } private function transition(object
$subject, Transition
$transition, Marking
$marking, array
$context): array
{ if (!
$this->
shouldDispatchEvent(WorkflowEvents::TRANSITION,
$context)) { return $context;
} $event =
new TransitionEvent($subject,
$marking,
$transition,
$this,
$context);
$this->dispatcher->
dispatch($event, WorkflowEvents::TRANSITION
);
$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();