eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway::loadRoleByIdentifier PHP Method

loadRoleByIdentifier() abstract public method

Loads a specified role by $identifier.
abstract public loadRoleByIdentifier ( string $identifier, integer $status = Role::STATUS_DEFINED ) : array
$identifier string
$status integer One of Role::STATUS_DEFINED|Role::STATUS_DRAFT
return array
    public abstract function loadRoleByIdentifier($identifier, $status = Role::STATUS_DEFINED);

Usage Example

 /**
  * Loads a specified role by $identifier.
  *
  * @param string $identifier
  * @param int $status One of Role::STATUS_DEFINED|Role::STATUS_DRAFT
  *
  * @return array
  */
 public function loadRoleByIdentifier($identifier, $status = Role::STATUS_DEFINED)
 {
     try {
         return $this->innerGateway->loadRoleByIdentifier($identifier, $status);
     } catch (DBALException $e) {
         throw new RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new RuntimeException('Database error', 0, $e);
     }
 }
All Usage Examples Of eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway::loadRoleByIdentifier