geniv / nette-popup
Popup component for Nette Framework
v2.2.0
2019-07-09 16:57 UTC
Requires
- php: >=7.0
- geniv/nette-general-form: >=1.0
- nette/nette: >=2.4
README
Installation
$ composer require geniv/nette-popup
or
"geniv/nette-popup": "^2.2"
require:
"php": ">=7.0", "nette/nette": ">=2.4", "geniv/nette-general-form": ">=1.0"
Include in application
neon configure:
services: - Popup
usage:
protected function createComponentPopup(IPopup $popup): IPopup { //$popup->setTemplatePath(__DIR__ . '/templates/popup.latte'); //$popup->setCookieName('cookie-popup'); //$popup->setCookieExpire('+10 years'); //$popup->enableSaveCookie(false); //$popup->setAutoOpen(false); //$popup->addVariableTemplate(['a' => 'b']); //$popup->onShowBlock[] = function() {}; //$popup->onHideBlock[] = function() {}; return $popup; }
usage:
{control popup}
$this['popup']->show(); $this['popup']->hide();