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

insertLanguage() abstract public method

Inserts the given $language.
abstract 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 abstract function insertLanguage(Language $language);

Usage Example

 /**
  * Inserts the given $language
  *
  * @param Language $language
  *
  * @return int 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);
     }
 }
All Usage Examples Of eZ\Publish\Core\Persistence\Legacy\Content\Language\Gateway::insertLanguage