Interface

eZ\Publish\SPI\Repository\Values\MultiLanguageName

interface MultiLanguageName

This is the interface for all ValueObjects implementing translated name logic.

Provides a uniform way for API consuming logic to generate translated names / labels for API objects. Language logic is meant to also be used for description, fields, ... lookup as well.

Methods

string[] getNames()

Return the human readable name in all provided languages.

string|null getName(string|null $languageCode = null)

Return the name of the domain object in a given language.

Details

at line 30
public string[] getNames()

Return the human readable name in all provided languages.

The structure of the return value is: array( 'eng' => '', 'de' => '' );

Return Value

string[]

at line 47
public string|null getName(string|null $languageCode = null)

Return the name of the domain object in a given language.

Parameters

string|null $languageCode

Return Value

string|null The name for a given language, or null if $languageCode is not set or does not exist.