mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +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;
|
||||
|
@@ -36,6 +36,11 @@ interface EntityWorkflowHandlerInterface
|
||||
*/
|
||||
public function getRoleShow(EntityWorkflow $entityWorkflow): ?string;
|
||||
|
||||
/**
|
||||
* @return User[]
|
||||
*/
|
||||
public function getSuggestedUsers(EntityWorkflow $entityWorkflow): array;
|
||||
|
||||
public function getTemplate(EntityWorkflow $entityWorkflow, array $options = []): string;
|
||||
|
||||
public function getTemplateData(EntityWorkflow $entityWorkflow, array $options = []): array;
|
||||
|
Reference in New Issue
Block a user