bajzany/notify

There is no license information available for the latest version (v2.0.1) of this package.

Notify Control for Nette Framework

Installs: 482

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:JavaScript

Type:extensions

v2.0.1 2019-07-24 10:57 UTC

This package is auto-updated.

Last update: 2024-03-25 06:40:30 UTC


README

Nette notification for message

Required:

Paginator

Instalation

  • Composer instalation

      composer require bajzany/notify dev-master
    
  • Register into Nette Application

      extensions:
      	Notify: Bajzany\Notify\DI\NotifyExtension		
    
  • How to Use:

    • In presenter notifyTrait;

        use NotifyTrait;
      
    • Adding to notifications collections

        $this->addNotify('Second notification', 'NotifyControl', Notification::TYPE_PURPLE);
      
    • Template (.latte) in your base Latte

        {control notify}
      
  • Create callable property onAfterRender and function afterRender into presenter where is placed notifyTrait. This is important because in ajax request must be start redrawControl.

/**
 * @var callable[]
 */
public $onAfterRender = [];

protected function afterRender()
{
	parent::afterRender();
	$this->onAfterRender();
}