PHP Класс Neos\Flow\I18n\EelHelper\TranslationParameterToken

It also translates labels according to the configuration it stores
Наследование: implements Neos\Eel\ProtectedContextAwareInterface
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$parameters array Key/Value store to keep the collected parameters
$translator Neos\Flow\I18n\Translator

Открытые методы

Метод Описание
__construct ( string $id = null, string $value = null )
__toString ( ) Runs translate to avoid the need of calling translate as a finishing method
allowsCallOfMethod ( string $methodName ) : boolean All methods are considered safe
arguments ( array $arguments ) : TranslationParameterToken Set the arguments.
id ( string $id ) : TranslationParameterToken Set the id.
injectTranslator ( Translator $translator ) Inject the translator into the token.
locale ( string $locale ) : TranslationParameterToken Set the locale.
package ( string $package ) : TranslationParameterToken Set the package.
quantity ( mixed $quantity ) : TranslationParameterToken Set the quantity.
source ( string $source ) : TranslationParameterToken Set the source.
translate ( array $overrides = [] ) : string Translate according to currently collected parameters
value ( string $value ) : TranslationParameterToken Set the original translation value (the untranslated source string).

Описание методов

__construct() публичный Метод

public __construct ( string $id = null, string $value = null )
$id string
$value string

__toString() публичный Метод

Runs translate to avoid the need of calling translate as a finishing method
public __toString ( )

allowsCallOfMethod() публичный Метод

All methods are considered safe
public allowsCallOfMethod ( string $methodName ) : boolean
$methodName string
Результат boolean

arguments() публичный Метод

Set the arguments.
public arguments ( array $arguments ) : TranslationParameterToken
$arguments array Numerically indexed array of values to be inserted into placeholders
Результат TranslationParameterToken

id() публичный Метод

Set the id.
public id ( string $id ) : TranslationParameterToken
$id string Id to use for finding translation (trans-unit id in XLIFF)
Результат TranslationParameterToken

injectTranslator() публичный Метод

Used for testing.
public injectTranslator ( Translator $translator )
$translator Neos\Flow\I18n\Translator

locale() публичный Метод

The locale Identifier will be converted into a Locale
public locale ( string $locale ) : TranslationParameterToken
$locale string An identifier of locale to use (NULL for use the default locale)
Результат TranslationParameterToken

package() публичный Метод

Set the package.
public package ( string $package ) : TranslationParameterToken
$package string Target package key. If not set, the current package key will be used
Результат TranslationParameterToken

quantity() публичный Метод

Set the quantity.
public quantity ( mixed $quantity ) : TranslationParameterToken
$quantity mixed A number to find plural form for (float or int), NULL to not use plural forms
Результат TranslationParameterToken

source() публичный Метод

Set the source.
public source ( string $source ) : TranslationParameterToken
$source string Name of file with translations
Результат TranslationParameterToken

translate() публичный Метод

Translate according to currently collected parameters
public translate ( array $overrides = [] ) : string
$overrides array An associative array to override the collected parameters
Результат string

value() публичный Метод

Set the original translation value (the untranslated source string).
public value ( string $value ) : TranslationParameterToken
$value string
Результат TranslationParameterToken

Описание свойств

$parameters защищенное свойство

Key/Value store to keep the collected parameters
protected array $parameters
Результат array

$translator защищенное свойство

protected Translator,Neos\Flow\I18n $translator
Результат Neos\Flow\I18n\Translator