[workflow][method] add method to get involved/suggested users

This commit is contained in:
2023-02-24 17:20:35 +01:00
parent 9c589b9296
commit 4c7a16587b
6 changed files with 73 additions and 0 deletions

View File

@@ -348,6 +348,22 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
return $this->transitionningStep;
}
/**
* @return User[]
*/
public function getUsersInvolved(): array
{
$usersInvolved = [];
foreach ($this->steps as $step) {
foreach ($step->getDestUser() as $u) {
$usersInvolved[$u->getId()] = $u;
}
}
return $usersInvolved;
}
public function getWorkflowName(): string
{
return $this->workflowName;