loadPoliciesByUserId() абстрактный публичный Метод

Returns the user policies associated with the user.
abstract public loadPoliciesByUserId ( mixed $userId ) : UserPolicy[]
$userId mixed
Результат UserPolicy[]
Пример #1
0
 /**
  * Returns the user policies associated with the user (including inherited policies from user groups).
  *
  * @param mixed $userId
  *
  * @return \eZ\Publish\SPI\Persistence\User\Policy[]
  */
 public function loadPoliciesByUserId($userId)
 {
     $data = $this->roleGateway->loadPoliciesByUserId($userId);
     $policies = $this->mapper->mapPolicies($data);
     foreach ($policies as $policy) {
         $this->limitationConverter->toSPI($policy);
     }
     return $policies;
 }
 /**
  * Returns the user policies associated with the user.
  *
  * @param mixed $userId
  *
  * @return UserPolicy[]
  */
 public function loadPoliciesByUserId($userId)
 {
     try {
         return $this->innerGateway->loadPoliciesByUserId($userId);
     } catch (DBALException $e) {
         throw new RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new RuntimeException('Database error', 0, $e);
     }
 }