Componette

Componette

deprecated-packages

deprecated-packages / FlashMessageComponent v2.0.0

[DEPRECATED] Flash message component for Nette Framework

download-cloud-line composer require zenify/flash-message-component

Flash Message Component

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}
  • v2.0.0 Released version 2

    • removed prefix for ControlFactory [BC break]
    • for other changes see diff v1.1.3...v2.0.0
  • v1.1.3 Released version 1.1.3

    • PHP 5.3 support added
    • tests added
    • custom prefix class enabled via setClassPrefix()
    • Kdyby\Translation prefixed translator enabled via setTranslatorPrefix()
Componette Componette felix@nette.org