eZ\Publish\Core\Persistence\Legacy\Content\Language\Gateway\ExceptionConversion::insertLanguage PHP Method

insertLanguage() public method

Inserts the given $language.
public insertLanguage ( eZ\Publish\SPI\Persistence\Content\Language $language ) : integer
$language eZ\Publish\SPI\Persistence\Content\Language
return integer ID of the new language
    public function insertLanguage(Language $language)
    {
        try {
            return $this->innerGateway->insertLanguage($language);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }