Skip to content

mentor/FlashMessageComponent

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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}

About

Flash message component for Nette Framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%