eZPublishCommunityProject  2012.12
eZ\Publish\API\Repository\LanguageService Interface Reference
+ Inheritance diagram for eZ\Publish\API\Repository\LanguageService:

Public Member Functions

 createLanguage (LanguageCreateStruct $languageCreateStruct)
 Creates the a new Language in the content repository. More...
 
 deleteLanguage (Language $language)
 Deletes a language from content repository. More...
 
 disableLanguage (Language $language)
 Disables a language. More...
 
 enableLanguage (Language $language)
 Enables a language. More...
 
 getDefaultLanguageCode ()
 Returns a configured default language code. More...
 
 loadLanguage ($languageCode)
 Loads a Language from its language code ($languageCode) More...
 
 loadLanguageById ($languageId)
 Loads a Language by its id ($languageId) More...
 
 loadLanguages ()
 Loads all Languages. More...
 
 newLanguageCreateStruct ()
 Instantiates an object to be used for creating languages. More...
 
 updateLanguageName (Language $language, $newName)
 Changes the name of the language in the content repository. More...
 

Member Function Documentation

eZ\Publish\API\Repository\LanguageService::createLanguage ( LanguageCreateStruct  $languageCreateStruct)

Creates the a new Language in the content repository.

Exceptions
\eZ\Publish\API\Repository\Exceptions\UnauthorizedExceptionIf user does not have access to content translations
\eZ\Publish\API\Repository\Exceptions\InvalidArgumentExceptionif the languageCode already exists
Parameters
\eZ\Publish\API\Repository\Values\Content\LanguageCreateStruct$languageCreateStruct
Returns

Implemented in eZ\Publish\Core\REST\Client\LanguageService, eZ\Publish\Core\Repository\LanguageService, and eZ\Publish\Core\SignalSlot\LanguageService.

eZ\Publish\API\Repository\LanguageService::deleteLanguage ( Language  $language)

Deletes a language from content repository.

Exceptions
\eZ\Publish\API\Repository\Exceptions\InvalidArgumentExceptionif language can not be deleted because it is still assigned to some content / type / (...).
\eZ\Publish\API\Repository\Exceptions\UnauthorizedExceptionIf user is not allowed to delete a language
Parameters
\eZ\Publish\API\Repository\Values\Content\Language$language

Implemented in eZ\Publish\Core\Repository\LanguageService, eZ\Publish\Core\REST\Client\LanguageService, and eZ\Publish\Core\SignalSlot\LanguageService.

eZ\Publish\API\Repository\LanguageService::disableLanguage ( Language  $language)

Disables a language.

Exceptions
\eZ\Publish\API\Repository\Exceptions\UnauthorizedExceptionIf user does not have access to content translations
Parameters
\eZ\Publish\API\Repository\Values\Content\Language$language
Returns

Implemented in eZ\Publish\Core\Repository\LanguageService, eZ\Publish\Core\REST\Client\LanguageService, and eZ\Publish\Core\SignalSlot\LanguageService.

eZ\Publish\API\Repository\LanguageService::enableLanguage ( Language  $language)

Enables a language.

Exceptions
\eZ\Publish\API\Repository\Exceptions\UnauthorizedExceptionIf user does not have access to content translations
Parameters
\eZ\Publish\API\Repository\Values\Content\Language$language
Returns

Implemented in eZ\Publish\Core\Repository\LanguageService, eZ\Publish\Core\REST\Client\LanguageService, and eZ\Publish\Core\SignalSlot\LanguageService.

eZ\Publish\API\Repository\LanguageService::getDefaultLanguageCode ( )
eZ\Publish\API\Repository\LanguageService::loadLanguage (   $languageCode)

Loads a Language from its language code ($languageCode)

Exceptions
\eZ\Publish\API\Repository\Exceptions\NotFoundExceptionif language could not be found
Parameters
string$languageCode
Returns

Implemented in eZ\Publish\Core\Repository\LanguageService, eZ\Publish\Core\REST\Client\LanguageService, and eZ\Publish\Core\SignalSlot\LanguageService.

eZ\Publish\API\Repository\LanguageService::loadLanguageById (   $languageId)

Loads a Language by its id ($languageId)

Exceptions
\eZ\Publish\API\Repository\Exceptions\NotFoundExceptionif language could not be found
Parameters
int$languageId
Returns

Implemented in eZ\Publish\Core\Repository\LanguageService, eZ\Publish\Core\REST\Client\LanguageService, and eZ\Publish\Core\SignalSlot\LanguageService.

eZ\Publish\API\Repository\LanguageService::loadLanguages ( )
eZ\Publish\API\Repository\LanguageService::newLanguageCreateStruct ( )

Instantiates an object to be used for creating languages.

Returns

Implemented in eZ\Publish\Core\Repository\LanguageService, eZ\Publish\Core\SignalSlot\LanguageService, and eZ\Publish\Core\REST\Client\LanguageService.

eZ\Publish\API\Repository\LanguageService::updateLanguageName ( Language  $language,
  $newName 
)

Changes the name of the language in the content repository.

Exceptions
\eZ\Publish\API\Repository\Exceptions\UnauthorizedExceptionIf user does not have access to content translations
Parameters
\eZ\Publish\API\Repository\Values\Content\Language$language
string$newName
Returns

Implemented in eZ\Publish\Core\Repository\LanguageService, eZ\Publish\Core\REST\Client\LanguageService, and eZ\Publish\Core\SignalSlot\LanguageService.


The documentation for this interface was generated from the following file: