mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 15:43:51 +00:00
[workflow][method] add method to get involved/suggested users
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user