function FlagNonGlobalCookieStorage::flag in Flag 7.3
Same name and namespace in other branches
- 6.2 flag.inc \FlagNonGlobalCookieStorage::flag()
- 7.2 flag.inc \FlagNonGlobalCookieStorage::flag()
"Flags" an item.
It just records this fact in a cookie.
Overrides FlagCookieStorage::flag
File
- includes/
flag.cookie_storage.inc, line 125 - Contains the FlagCookieStorage class.
Class
- FlagNonGlobalCookieStorage
- Storage handler for non-global flags.
Code
function flag($entity_id) {
if (!$this
->is_flagged($entity_id)) {
$this->flaggings[] = $this
->cookie_key($entity_id);
$this
->write();
}
}