Class

eZ\Publish\Core\Persistence\Legacy\Content\Language\Handler

class Handler implements Handler

Language Handler.

Methods

__construct(Gateway $languageGateway, Mapper $languageMapper)

Creates a new Language Handler.

Language create(CreateStruct $struct)

Create a new language.

update(Language $language)

Update language.

Language load(mixed $id)

Get language by id.

Language loadByLanguageCode(string $languageCode)

Get language by Language Code (eg: eng-GB).

Language[] loadAll()

Get all languages.

delete(mixed $id)

Delete a language.

Details

at line 42
public __construct(Gateway $languageGateway, Mapper $languageMapper)

Creates a new Language Handler.

Parameters

Gateway $languageGateway
Mapper $languageMapper

at line 55
public Language create(CreateStruct $struct)

Create a new language.

Parameters

CreateStruct $struct

Return Value

Language

at line 70
public update(Language $language)

Update language.

Parameters

Language $language

at line 84
public Language load(mixed $id)

Get language by id.

Parameters

mixed $id

Return Value

Language

Exceptions

NotFoundException If language could not be found by $id

at line 106
public Language loadByLanguageCode(string $languageCode)

Get language by Language Code (eg: eng-GB).

Parameters

string $languageCode

Return Value

Language

Exceptions

NotFoundException If language could not be found by $languageCode

at line 124
public Language[] loadAll()

Get all languages.

Return Value

Language[]

at line 138
public delete(mixed $id)

Delete a language.

Parameters

mixed $id

Exceptions

LogicException If language could not be deleted