zenify/flash-message-component

This package is abandoned and no longer maintained. No replacement package was suggested.

Flash message component for Nette

v4.0.1 2015-03-12 09:36 UTC

This package is not auto-updated.

Last update: 2019-02-20 17:54:44 UTC


README

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.

Install

Via Composer:

$ composer require zenify/flash-message-component

And register extension in config.neon:

extensions:
	- Zenify\FlashMessageComponent\DI\FlashMessageExtension

Usage

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}