Loading module/Formation/src/Formation/Controller/AgentController.php +7 −6 Original line number Diff line number Diff line Loading @@ -126,12 +126,13 @@ class AgentController extends AbstractActionController $agent = $this->getAgentService()->getAgentByUser($user); $agents = []; if ($role->getRoleId() === Agent::ROLE_SUPERIEURE) $agents = array_map(function (AgentSuperieur $a) { return $a->getAgent(); }, $this->getAgentSuperieurService()->getAgentsSuperieursBySuperieur($agent)); if ($role->getRoleId() === Agent::ROLE_AUTORITE) $agents = array_map(function (AgentAutorite $a) { return $a->getAgent(); }, $this->getAgentAutoriteService()->getAgentsAutoritesByAutorite($agent)); if ($role->getRoleId() === Agent::ROLE_SUPERIEURE) $agents = array_map( function (AgentSuperieur $a) {return $a->getAgent();}, $this->getAgentSuperieurService()->getAgentsSuperieursBySuperieur($agent)); if ($role->getRoleId() === Agent::ROLE_AUTORITE) $agents = array_map(function (AgentAutorite $a) { return $a->getAgent(); }, $this->getAgentAutoriteService()->getAgentsAutoritesByAutorite($agent)); usort($agents, function (Agent $a, Agent $b) { $aaa = $a->getNomUsuel() . " " . $a->getPrenom() . " " . $a->getId(); Loading module/Formation/src/Formation/Controller/StructureController.php +1 −3 Original line number Diff line number Diff line Loading @@ -83,9 +83,7 @@ class StructureController extends AbstractActionController { /** Récupération du sous-arbre des structures */ $structure = $this->getStructureService()->getRequestedStructure($this); $structures = $this->getStructureService()->getStructuresFilles($structure); $structures[] = $structure; $structures = $this->getStructureService()->getStructuresFilles($structure,true); /** Récupération des agents et postes liés aux structures */ $agents = $this->getAgentService()->getAgentsByStructures($structures); Loading Loading
module/Formation/src/Formation/Controller/AgentController.php +7 −6 Original line number Diff line number Diff line Loading @@ -126,12 +126,13 @@ class AgentController extends AbstractActionController $agent = $this->getAgentService()->getAgentByUser($user); $agents = []; if ($role->getRoleId() === Agent::ROLE_SUPERIEURE) $agents = array_map(function (AgentSuperieur $a) { return $a->getAgent(); }, $this->getAgentSuperieurService()->getAgentsSuperieursBySuperieur($agent)); if ($role->getRoleId() === Agent::ROLE_AUTORITE) $agents = array_map(function (AgentAutorite $a) { return $a->getAgent(); }, $this->getAgentAutoriteService()->getAgentsAutoritesByAutorite($agent)); if ($role->getRoleId() === Agent::ROLE_SUPERIEURE) $agents = array_map( function (AgentSuperieur $a) {return $a->getAgent();}, $this->getAgentSuperieurService()->getAgentsSuperieursBySuperieur($agent)); if ($role->getRoleId() === Agent::ROLE_AUTORITE) $agents = array_map(function (AgentAutorite $a) { return $a->getAgent(); }, $this->getAgentAutoriteService()->getAgentsAutoritesByAutorite($agent)); usort($agents, function (Agent $a, Agent $b) { $aaa = $a->getNomUsuel() . " " . $a->getPrenom() . " " . $a->getId(); Loading
module/Formation/src/Formation/Controller/StructureController.php +1 −3 Original line number Diff line number Diff line Loading @@ -83,9 +83,7 @@ class StructureController extends AbstractActionController { /** Récupération du sous-arbre des structures */ $structure = $this->getStructureService()->getRequestedStructure($this); $structures = $this->getStructureService()->getStructuresFilles($structure); $structures[] = $structure; $structures = $this->getStructureService()->getStructuresFilles($structure,true); /** Récupération des agents et postes liés aux structures */ $agents = $this->getAgentService()->getAgentsByStructures($structures); Loading