PHP Class TwbBundle\Form\View\Helper\TwbBundleFormElement

Inheritance: extends Zend\Form\View\Helper\FormElement, implements Zend\I18n\Translator\TranslatorAwareInterface
Afficher le fichier Open project: neilime/zf2-twb-bundle Class Usage Examples

Protected Properties

Свойство Type Description
$addonFormat string
$classMap array Instance map to view helper
$inputGroupFormat string
$options TwbBundle\Options\ModuleOptions Hold configurable options
$translator Zend\I18n\Translator\Translator Translator (optional)
$translatorEnabled boolean Whether translator should be used
$translatorTextDomain string Translator text domain (optional)

Méthodes publiques

Méthode Description
__construct ( ModuleOptions $options )
getTranslator ( ) : null | Zend\I18n\Translator\TranslatorInterface Returns translator used in helper
getTranslatorTextDomain ( ) : string Return the translation text domain
hasTranslator ( ) : boolean Checks if the helper has a translator
isTranslatorEnabled ( ) : boolean Returns whether translator is enabled and should be used
render ( Zend\Form\ElementInterface $oElement ) : string Render an element
setTranslator ( Zend\I18n\Translator\TranslatorInterface $oTranslator = null, string $sTextDomain = null ) : TwbBundleFormElement Sets translator to use in helper
setTranslatorEnabled ( boolean $bEnabled = true ) : TwbBundleFormElement Sets whether translator is enabled and should be used
setTranslatorTextDomain ( string $sTextDomain = 'default' ) : TwbBundleFormElement Set translation text domain

Méthodes protégées

Méthode Description
renderAddOn ( string $aAddOnOptions ) : string Render addo-on markup

Method Details

__construct() public méthode

public __construct ( ModuleOptions $options )
$options TwbBundle\Options\ModuleOptions

getTranslator() public méthode

Returns translator used in helper
See also: TranslatorAwareInterface::getTranslator()
public getTranslator ( ) : null | Zend\I18n\Translator\TranslatorInterface
Résultat null | Zend\I18n\Translator\TranslatorInterface

getTranslatorTextDomain() public méthode

Return the translation text domain
See also: TranslatorAwareInterface::getTranslatorTextDomain()
public getTranslatorTextDomain ( ) : string
Résultat string

hasTranslator() public méthode

Checks if the helper has a translator
See also: TranslatorAwareInterface::hasTranslator()
public hasTranslator ( ) : boolean
Résultat boolean

isTranslatorEnabled() public méthode

Returns whether translator is enabled and should be used
See also: TranslatorAwareInterface::isTranslatorEnabled()
public isTranslatorEnabled ( ) : boolean
Résultat boolean

render() public méthode

Render an element
public render ( Zend\Form\ElementInterface $oElement ) : string
$oElement Zend\Form\ElementInterface
Résultat string

renderAddOn() protected méthode

Render addo-on markup
protected renderAddOn ( string $aAddOnOptions ) : string
$aAddOnOptions string
Résultat string

setTranslator() public méthode

Sets translator to use in helper
See also: TranslatorAwareInterface::setTranslator()
public setTranslator ( Zend\I18n\Translator\TranslatorInterface $oTranslator = null, string $sTextDomain = null ) : TwbBundleFormElement
$oTranslator Zend\I18n\Translator\TranslatorInterface : [optional] translator. Default is null, which sets no translator.
$sTextDomain string : [optional] text domain Default is null, which skips setTranslatorTextDomain
Résultat TwbBundleFormElement

setTranslatorEnabled() public méthode

Sets whether translator is enabled and should be used
See also: TranslatorAwareInterface::setTranslatorEnabled()
public setTranslatorEnabled ( boolean $bEnabled = true ) : TwbBundleFormElement
$bEnabled boolean
Résultat TwbBundleFormElement

setTranslatorTextDomain() public méthode

Set translation text domain
See also: TranslatorAwareInterface::setTranslatorTextDomain()
public setTranslatorTextDomain ( string $sTextDomain = 'default' ) : TwbBundleFormElement
$sTextDomain string
Résultat TwbBundleFormElement

Property Details

$addonFormat protected_oe static_oe property

protected static string $addonFormat
Résultat string

$classMap protected_oe property

Instance map to view helper
protected array $classMap
Résultat array

$inputGroupFormat protected_oe static_oe property

protected static string $inputGroupFormat
Résultat string

$options protected_oe property

Hold configurable options
protected ModuleOptions,TwbBundle\Options $options
Résultat TwbBundle\Options\ModuleOptions

$translator protected_oe property

Translator (optional)
protected Translator,Zend\I18n\Translator $translator
Résultat Zend\I18n\Translator\Translator

$translatorEnabled protected_oe property

Whether translator should be used
protected bool $translatorEnabled
Résultat boolean

$translatorTextDomain protected_oe property

Translator text domain (optional)
protected string $translatorTextDomain
Résultat string