nattreid/cookie-policy

Cookie policy for Nette Framework

2.2.4 2019-10-30 09:41 UTC

README

Nastavení v config.neon

extensions:
    cookiePolicy: NAtrreid\CookiePolicy\DI\CookiePolicyExtension
    
cookiePolicy:
    enable: true
    link: '/adresaStranky'
    analytics: true
    functional: true
    commercial: true

Použití

/** @var NAttreid\CookiePolicy\ICookiePolicyFactory @inject */
public $cookiePolicyFactory;

protected function createComponentCookiePolicy() {
    $control = $this->cookiePolicyFactory->create();

    // pro zmenu jazyka
    $control->translator->setLang('cs');

    return $control;
}