Helper to proxy the plugin flash messenger

package Default
inherited_from \Zend\I18n\View\Helper\AbstractTranslatorHelper

 Methods

Proxy the flash messenger plugin controller

__call(string $method, array $argv) : mixed

Parameters

$method

string

$argv

array

Returns

mixed

Returns the flash messenger plugin controller

__invoke(string|null $namespace = null) : \Zend\View\Helper\FlashMessenger | \Zend\Mvc\Controller\Plugin\FlashMessenger

Parameters

$namespace

stringnull

Returns

\Zend\View\Helper\FlashMessenger\Zend\Mvc\Controller\Plugin\FlashMessenger

Return whether auto escaping is enabled or disabled

getAutoEscape() 

return bool

Get the string used to close message representation

getMessageCloseString() : string

Returns

string

Get the formatted string used to open message representation

getMessageOpenFormat() : string

Returns

string

Get the string used to separate messages

getMessageSeparatorString() : string

Returns

string

Get the flash messenger plugin

getPluginFlashMessenger() : \Zend\Mvc\Controller\Plugin\FlashMessenger

Returns

\Zend\Mvc\Controller\Plugin\FlashMessenger

Get the service locator.

getServiceLocator() : \Zend\ServiceManager\ServiceLocatorInterface
inherited_from \Zend\ServiceManager\ServiceLocatorAwareInterface::getServiceLocator()

Returns

\Zend\ServiceManager\ServiceLocatorInterface

Returns translator used in helper

getTranslator() : \Zend\I18n\Translator\TranslatorInterface | null
Inherited
inherited_from \Zend\I18n\Translator\TranslatorAwareInterface::getTranslator()

Returns

\Zend\I18n\Translator\TranslatorInterfacenull

Return the translation text domain

getTranslatorTextDomain() : string
Inherited
inherited_from \Zend\I18n\Translator\TranslatorAwareInterface::getTranslatorTextDomain()

Returns

string

Get the view object

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

Returns

null\Zend\View\Renderer\RendererInterface

Checks if the helper has a translator

hasTranslator() : boolean
Inherited
inherited_from \Zend\I18n\Translator\TranslatorAwareInterface::hasTranslator()

Returns

boolean

Returns whether translator is enabled and should be used

isTranslatorEnabled() : boolean
Inherited
inherited_from \Zend\I18n\Translator\TranslatorAwareInterface::isTranslatorEnabled()

Returns

boolean

Render Messages

render(string $namespace = \Zend\Mvc\Controller\Plugin\FlashMessenger::NAMESPACE_DEFAULT, array $classes = array(), null|boolean $autoEscape = null) : string

Parameters

$namespace

string

$classes

array

$autoEscape

nullboolean

Returns

string

Render Current Messages

renderCurrent(string $namespace = \Zend\Mvc\Controller\Plugin\FlashMessenger::NAMESPACE_DEFAULT, array $classes = array(), boolean|null $autoEscape = null) : string

Parameters

$namespace

string

$classes

array

$autoEscape

booleannull

Returns

string

Set whether or not auto escaping should be used

setAutoEscape(boolean $autoEscape = true) : \Zend\View\Helper\FlashMessenger
fluent This method is part of a fluent interface and will return the same instance

Parameters

$autoEscape

boolean

Returns

\Zend\View\Helper\FlashMessenger

Set the string used to close message representation

setMessageCloseString(string $messageCloseString) : \Zend\View\Helper\FlashMessenger

Parameters

$messageCloseString

string

Returns

\Zend\View\Helper\FlashMessenger

Set the formatted string used to open message representation

setMessageOpenFormat(string $messageOpenFormat) : \Zend\View\Helper\FlashMessenger

Parameters

$messageOpenFormat

string

Returns

\Zend\View\Helper\FlashMessenger

Set the string used to separate messages

setMessageSeparatorString(string $messageSeparatorString) : \Zend\View\Helper\FlashMessenger

Parameters

$messageSeparatorString

string

Returns

\Zend\View\Helper\FlashMessenger

Set the flash messenger plugin

setPluginFlashMessenger(\Zend\Mvc\Controller\Plugin\FlashMessenger $pluginFlashMessenger) : \Zend\View\Helper\FlashMessenger

Parameters

$pluginFlashMessenger

\Zend\Mvc\Controller\Plugin\FlashMessenger

Returns

\Zend\View\Helper\FlashMessenger

Set the service locator.

setServiceLocator(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator) : \Zend\View\Helper\AbstractHelper
inherited_from \Zend\ServiceManager\ServiceLocatorAwareInterface::setServiceLocator()

Parameters

$serviceLocator

\Zend\ServiceManager\ServiceLocatorInterface

Returns

\Zend\View\Helper\AbstractHelper

Sets translator to use in helper

setTranslator(\Zend\I18n\Translator\TranslatorInterface $translator = null, string $textDomain = null) : \Zend\I18n\View\Helper\AbstractTranslatorHelper
Inherited
inherited_from \Zend\I18n\Translator\TranslatorAwareInterface::setTranslator()

Parameters

$translator

\Zend\I18n\Translator\TranslatorInterface

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

$textDomain

string

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

Returns

\Zend\I18n\View\Helper\AbstractTranslatorHelper

Sets whether translator is enabled and should be used

setTranslatorEnabled(boolean $enabled = true) : \Zend\I18n\View\Helper\AbstractTranslatorHelper
Inherited
inherited_from \Zend\I18n\Translator\TranslatorAwareInterface::setTranslatorEnabled()

Parameters

$enabled

boolean

Returns

\Zend\I18n\View\Helper\AbstractTranslatorHelper

Set translation text domain

setTranslatorTextDomain(string $textDomain = 'default') : \Zend\I18n\View\Helper\AbstractTranslatorHelper
Inherited
inherited_from \Zend\I18n\Translator\TranslatorAwareInterface::setTranslatorTextDomain()

Parameters

$textDomain

string

Returns

\Zend\I18n\View\Helper\AbstractTranslatorHelper

Set the View object

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

Parameters

$view

\Zend\View\Renderer\RendererInterface

Returns

\Zend\View\Helper\AbstractHelper

Retrieve the escapeHtml helper

getEscapeHtmlHelper() : \Zend\View\Helper\EscapeHtml

Returns

\Zend\View\Helper\EscapeHtml

Render Messages

renderMessages(string $namespace = \Zend\Mvc\Controller\Plugin\FlashMessenger::NAMESPACE_DEFAULT, array $messages = array(), array $classes = array(), boolean|null $autoEscape = null) : string

Parameters

$namespace

string

$messages

array

$classes

array

$autoEscape

booleannull

Returns

string

 Properties

 

Flag whether to escape messages

$autoEscape : boolean

Default

true
 

Default attributes for the open format tag

$classMessages : array

Default

array(\Zend\Mvc\Controller\Plugin\FlashMessenger::NAMESPACE_INFO => 'info', \Zend\Mvc\Controller\Plugin\FlashMessenger::NAMESPACE_ERROR => 'error', \Zend\Mvc\Controller\Plugin\FlashMessenger::NAMESPACE_SUCCESS => 'success', \Zend\Mvc\Controller\Plugin\FlashMessenger::NAMESPACE_DEFAULT => 'default', \Zend\Mvc\Controller\Plugin\FlashMessenger::NAMESPACE_WARNING => 'warning')
 

Html escape helper

$escapeHtmlHelper : \Zend\View\Helper\EscapeHtml

Default

 

Templates for the open/close/separators for message tags

$messageCloseString : string

Default

''
 

$messageOpenFormat

$messageOpenFormat 

Default

'
  • '
  •  

    $messageSeparatorString

    $messageSeparatorString 

    Default

    '
  • '
  •  

    Flash messenger plugin

    $pluginFlashMessenger : \Zend\Mvc\Controller\Plugin\FlashMessenger

    Default

     

    Service locator

    $serviceLocator : \Zend\ServiceManager\ServiceLocatorInterface

    Default

     

    Translator (optional)

    $translator : \Zend\I18n\Translator\TranslatorInterface

    Default

     

    Whether translator should be used

    $translatorEnabled : boolean

    Default

    true
     

    Translator text domain (optional)

    $translatorTextDomain : string

    Default

    'default'
     

    View object instance

    $view : \Zend\View\Renderer\RendererInterface

    Default

    null