zenify / flash-message-component
Flash message component for Nette
Installs: 8 416
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 3
Open Issues: 0
Requires
- php: >=5.5
- latte/latte: ~2.2
- nette/application: ~2.2
- nette/robot-loader: ~2.2
- tracy/tracy: ~2.2
Requires (Dev)
- nette/bootstrap: ~2.0
README
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}