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

createRole() abstract public method

Create new role.
abstract public createRole ( eZ\Publish\SPI\Persistence\User\Role $role ) : eZ\Publish\SPI\Persistence\User\Role
$role eZ\Publish\SPI\Persistence\User\Role
return eZ\Publish\SPI\Persistence\User\Role
    public abstract function createRole(Role $role);

Usage Example

コード例 #1
0
 /**
  * Create new role.
  *
  * @param Role $role
  *
  * @return Role
  */
 public function createRole(Role $role)
 {
     try {
         return $this->innerGateway->createRole($role);
     } 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::createRole