Skip to content

nattreid/cookie-policy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cookie Policy pro Nette Framework

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;
}