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

createRole() public method

Create new role.
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 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);
        }
    }