コード例 #1
0
 /**
  * Fetch all or a subset of resources
  *
  * @param  array $params
  * @return ApiProblem|mixed
  */
 public function fetchAll($params = array())
 {
     $userRepository = $this->repository->getUsersRepository();
     $user = $userRepository->findByUsername($this->getIdentity()->getRoleId());
     //if ($user->getRole() == "salesman"){
     //return $this->repository->findAllIdUsuario($user->getId());
     //}
     return $this->repository->findAll();
 }