PHP Interface eZ\Publish\Core\Base\Translatable

Afficher le fichier Open project: ezsystems/ezpublish-kernel

Méthodes publiques

Méthode Description
addParameter ( string $name, string $value ) Adds a parameter to existing hash map.
addParameters ( array $parameters ) Adds $parameters to existing hash map.
getBaseTranslation ( ) : string Returns base translation, computed with message template and parameters.
getMessageTemplate ( ) : string Returns the message template, with placeholders for parameters.
getParameters ( ) : array Returns a hash map with param placeholder as key and its corresponding value.
setMessageTemplate ( string $messageTemplate ) Injects the message template.
setParameters ( array $parameters ) Injects the hash map, with param placeholder as key and its corresponding value.

Method Details

addParameter() public méthode

Adds a parameter to existing hash map.
public addParameter ( string $name, string $value )
$name string
$value string

addParameters() public méthode

Adds $parameters to existing hash map.
public addParameters ( array $parameters )
$parameters array

getBaseTranslation() public méthode

Returns base translation, computed with message template and parameters.
public getBaseTranslation ( ) : string
Résultat string

getMessageTemplate() public méthode

E.g. "Content with ID %contentId% could not be found".
public getMessageTemplate ( ) : string
Résultat string

getParameters() public méthode

E.g. array('%contentId%' => 123).
public getParameters ( ) : array
Résultat array

setMessageTemplate() public méthode

Injects the message template.
public setMessageTemplate ( string $messageTemplate )
$messageTemplate string

setParameters() public méthode

E.g. array('%contentId%' => 123). If parameters already existed, they will be replaced by the passed here.
public setParameters ( array $parameters )
$parameters array