protected function FlagNonGlobalCookieStorage::write in Flag 6.2
Same name and namespace in other branches
- 7.3 includes/flag.cookie_storage.inc \FlagNonGlobalCookieStorage::write()
- 7.2 flag.inc \FlagNonGlobalCookieStorage::write()
2 calls to FlagNonGlobalCookieStorage::write()
- FlagNonGlobalCookieStorage::flag in ./
flag.inc - "Flags" an item.
- FlagNonGlobalCookieStorage::unflag in ./
flag.inc - "Unflags" an item.
File
- ./
flag.inc, line 1910 - Implements various flags. Uses object oriented style inspired by that of Views 2.
Class
- FlagNonGlobalCookieStorage
- Storage handler for non-global flags.
Code
protected function write() {
$serialized = implode(' ', array_filter($this->flaggings));
setcookie('flags', $serialized, time() + $this
->get_lifetime(), base_path());
$_COOKIE['flags'] = $serialized;
}