public function getUserService() { if ($this->userService !== null) { return $this->userService; } $this->userService = new UserService($this->repository->getUserService(), $this->signalDispatcher); return $this->userService; }
/** * Permite definir el usuario actual * @param integer $user_id id del usuario a definir */ protected function setCurrentUser($user_id) { $this->currentUser = $this->repository->getUserService()->loadUser($user_id); $this->repository->setCurrentUser($this->currentUser); return $this; }