via:
$ 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"
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}
Nette\InvalidStateException: Component 'cookieBar' already has a parent. in ...
return clone $cookieBar;