9 use BristolSU\ControlDB\Contracts\Repositories\Role as RoleRepository;
10 use BristolSU\ControlDB\Contracts\Repositories\Group as GroupRepository;
75 if (($role = $this->
getRole()) !== null) {
76 return $role->group();
79 if ($this->request !== null && $this->request->query->has(
'group_id')) {
81 return $this->groupRepository->getById($this->request->query->get(
'group_id'));
95 if ($this->request !== null && $this->request->query->has(
'role_id')) {
97 return $this->roleRepository->getById($this->request->query->get(
'role_id'));
111 if ($this->request !== null && $this->request->query->has(
'user_id')) {
113 return $this->userRepository->getById($this->request->query->get(
'user_id'));
128 $this->request->query->set(
'group_id', $group->id());
139 $this->request->query->set(
'role_id', $role->id());
150 $this->request->query->set(
'user_id', $user->id());
160 $this->request->query->set(
'user_id', null);
161 $this->request->query->set(
'group_id', null);
162 $this->request->query->set(
'role_id', null);
__construct(Request $request, RoleRepository $roleRepository, GroupRepository $groupRepository, UserRepository $userRepository)