You are here

function flag_flag::remember_content in Flag 6

Same name and namespace in other branches
  1. 5 flag.inc \flag_flag::remember_content()
  2. 6.2 flag.inc \flag_flag::remember_content()
  3. 7.2 flag.inc \flag_flag::remember_content()

Stores some object in fetch_content()'s cache, so subsequenet calls to fetch_content() return it.

This is needed because otherwise fetch_object() loads the object from the database (by calling _load_content()), whereas sometimes we want to fetch an object that hasn't yet been saved to the database. See flag_nodeapi().

File

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

Class

flag_flag
This abstract class represents a flag, or, in Views 2 terminology, "a handler".

Code

function remember_content($content_id, $object) {
  $this
    ->fetch_content($content_id, $object);
}