Skip to content

Latest commit

 

History

History
executable file
·
60 lines (41 loc) · 1.66 KB

readme.md

File metadata and controls

executable file
·
60 lines (41 loc) · 1.66 KB

Zenify/FlashMessageComponent

Build Status Quality Score Code Coverage Downloads this Month Latest stable

This extension simplifies use of flash messages in templates just to {control flashMessage}: Also includes translator support and css class prefix.

Installation

Install the latest version via composer:

$ composer require zenify/flash-message-component

And register extension in config.neon:

extensions:
	- Zenify\FlashMessageComponent\DI\FlashMessageExtension

Use

Inject to presenter

class Presenter ...
{

	/**
	 * @inject
	 * @var Zenify\FlashMessageComponent\FlashMessageControlFactory
	 */
	public $flashMessageControlFactory;


	/**
	 * @return Zenify\FlashMessageComponent\FlashMessageControl
	 */
	public function createComponentFlashMessage()
	{
		return $this->flashMessageControlFactory->create();
	}

}

Render in template

{control flashMessage}