PHP Interface eZ\Publish\Core\Base\Translatable

Datei anzeigen Open project: ezsystems/ezpublish-kernel

Public Methods

Method 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 method

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

addParameters() public method

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

getBaseTranslation() public method

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

getMessageTemplate() public method

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

getParameters() public method

E.g. array('%contentId%' => 123).
public getParameters ( ) : array
return array

setMessageTemplate() public method

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

setParameters() public method

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