loadRoleAssignment() abstract public method

Loads role assignment for specified assignment ID.
abstract public loadRoleAssignment ( mixed $roleAssignmentId ) : array
$roleAssignmentId mixed
return array
Example #1
0
 /**
  * Loads role assignment for specified assignment ID.
  *
  * @param mixed $roleAssignmentId
  *
  * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException If role assignment is not found
  *
  * @return \eZ\Publish\SPI\Persistence\User\RoleAssignment
  */
 public function loadRoleAssignment($roleAssignmentId)
 {
     $data = $this->roleGateway->loadRoleAssignment($roleAssignmentId);
     if (empty($data)) {
         throw new NotFound('roleAssignment', $roleAssignmentId);
     }
     return $this->mapper->mapRoleAssignments($data)[0];
 }
 /**
  * Loads role assignment for specified assignment ID.
  *
  * @param mixed $roleAssignmentId
  *
  * @return array
  */
 public function loadRoleAssignment($roleAssignmentId)
 {
     try {
         return $this->innerGateway->loadRoleAssignment($roleAssignmentId);
     } catch (DBALException $e) {
         throw new RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new RuntimeException('Database error', 0, $e);
     }
 }