geniv / nette-cookie-bar
Cookie bar component for Nette Framework
v2.1.1
2018-12-17 16:36 UTC
Requires
- php: >=7.0
- geniv/nette-general-form: >=1.0
- nette/nette: >=2.4
README
via:
Installation
$ composer require geniv/nette-cookie-bar
or
"geniv/nette-cookie-bar": "^2.0"
require:
"php": ">=7.0", "nette/nette": ">=2.4", "geniv/nette-general-form": ">=1.0"
Include in application
neon configure:
services: - CookieBar
usage:
protected function createComponentCookieBar(ICookieBar $cookieBar): ICookieBar { //$cookieBar->setTemplatePath(__DIR__ . '/templates/cookieBar.latte'); $cookieBar->setCookieName('nette-web-cookie-bar'); //$cookieBar->setCookieExpire('+10 years'); return clone $cookieBar; }
usage (before </body>
):
{control cookieBar}
resolve problem:
Nette\InvalidStateException: Component 'cookieBar' already has a parent. in ...
return clone $cookieBar;