You are here

function FlagNonGlobalCookieStorage::flag in Flag 7.2

Same name and namespace in other branches
  1. 6.2 flag.inc \FlagNonGlobalCookieStorage::flag()
  2. 7.3 includes/flag.cookie_storage.inc \FlagNonGlobalCookieStorage::flag()

"Flags" an item.

It just records this fact in a cookie.

Overrides FlagCookieStorage::flag

File

./flag.inc, line 1980
Implements various flags. Uses object oriented style inspired by that of Views 2.

Class

FlagNonGlobalCookieStorage
Storage handler for non-global flags.

Code

function flag($content_id) {
  if (!$this
    ->is_flagged($content_id)) {
    $this->flaggings[] = $this
      ->cookie_key($content_id);
    $this
      ->write();
  }
}