public function __invoke($id = null) { if ($id) { return $this->getEntity($id); } return $this->authenticationService->getAccountEntity(); }
public function __invoke($permission, $assert = null, AccountInterface $account = null) { if ($account === null) { $account = $this->authenticationService->getAccountEntity(); } //$groups = $account->getGroups(); //var_dump($groups->count()); //exit; return $this->authorizationService->isGranted('account-' . $account->getId()->toString(), $permission, $assert); }
public function indexAction() { $account = $this->authenticationService->getAccountEntity(); return new ViewModel(['account' => $account, 'remoteAddressLookup' => $this->sessionService->getRemoteAddressLookup(), 'sessions' => $this->sessionService->getForAccount($account), 'userAgentParser' => $this->sessionService->getUserAgentParser()]); }
public function __invoke() { return $this->authService->getAccountEntity(); }