Class AbstractTranslatorHelper

Summary

Fully Qualified Name: Laminas\I18n\View\Helper\AbstractTranslatorHelper
Extends: AbstractHelper
Implements: TranslatorAwareInterface

Description

Methods

Name Description Defined By
getTranslator() Returns translator used in helper AbstractTranslatorHelper
getTranslatorTextDomain() Return the translation text domain AbstractTranslatorHelper
getView() Get the view object AbstractHelper
hasTranslator() Checks if the helper has a translator AbstractTranslatorHelper
isTranslatorEnabled() Returns whether translator is enabled and should be used AbstractTranslatorHelper
setTranslator() Sets translator to use in helper AbstractTranslatorHelper
setTranslatorEnabled() Sets whether translator is enabled and should be used AbstractTranslatorHelper
setTranslatorTextDomain() Set translation text domain AbstractTranslatorHelper
setView() Set the View object AbstractHelper

Method Details

getTranslator()

Returns translator used in helper

Returns: \Translator|null

getTranslatorTextDomain()

Return the translation text domain

Returns: string

getView()

Get the view object

Returns: null|\Renderer

hasTranslator()

Checks if the helper has a translator

Returns: bool

isTranslatorEnabled()

Returns whether translator is enabled and should be used

Returns: bool

setTranslator()

Sets translator to use in helper

Parameter Name Type Description
$translator \Translator|null Default
$textDomain string|null Default

Returns: $this

setTranslatorEnabled()

Sets whether translator is enabled and should be used

Parameter Name Type Description
$enabled bool

Returns: $this

setTranslatorTextDomain()

Set translation text domain

Parameter Name Type Description
$textDomain string

Returns: $this

setView()

Set the View object

Parameter Name Type Description
$view \Renderer

Returns: \AbstractHelper

Top