Loads role assignment for specified assignment ID.
abstract public loadRoleAssignment ( mixed $roleAssignmentId ) : array | ||
$roleAssignmentId | mixed | |
리턴 | array |
/** * 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); } }