Methods

Returns translator used in helper

getTranslator() : \Zend\I18n\Translator\Translator | null

Return the translation text domain

getTranslatorTextDomain() : string

Returns

string

Get the view object

getView() : null | \Zend\View\Renderer\RendererInterface
Inherited

inherited_from \Zend\View\Helper\AbstractHelper::getView()

Returns

Checks if the helper has a translator

hasTranslator() : bool

Returns

bool

Returns whether translator is enabled and should be used

isTranslatorEnabled() : bool

Returns

bool

Sets translator to use in helper

setTranslator(\Zend\I18n\Translator\Translator $translator, string $textDomain) : \Zend\I18n\View\Helper\AbstractTranslatorHelper

Parameters

$translator

\Zend\I18n\Translator\Translator

[optional] translator. Default is null, which sets no translator.

$textDomain

string

[optional] text domain Default is null, which skips setTranslatorTextDomain

Returns

Sets whether translator is enabled and should be used

setTranslatorEnabled(bool $enabled) : \Zend\I18n\View\Helper\AbstractTranslatorHelper

Parameters

$enabled

bool

[optional] whether translator should be used. Default is true.

Returns

Set translation text domain

setTranslatorTextDomain(string $textDomain) : \Zend\I18n\View\Helper\AbstractTranslatorHelper

Parameters

$textDomain

string

Returns

Set the View object

setView(\Zend\View\Renderer\RendererInterface $view) : \Zend\View\Helper\AbstractHelper
Inherited

inherited_from \Zend\View\Helper\AbstractHelper::setView()

Parameters

Returns

 Properties

 

Translator (optional)

$translator : \Zend\I18n\Translator\Translator

 

Whether translator should be used

$translatorEnabled : bool

 

Translator text domain (optional)

$translatorTextDomain : string

 

View object

$view : \Zend\View\Renderer\RendererInterface
Inherited

inherited_from \Zend\View\Helper\AbstractHelper::$$view