You are here

function flag_flag::factory_by_content_type in Flag 5

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

Another factory method. Returns a new, "empty" flag; e.g., one suitable for the "Add new flag" page.

@static

3 calls to flag_flag::factory_by_content_type()
flag_add_form_validate in includes/flag.admin.inc
flag_form in includes/flag.admin.inc
Add/Edit flag page.
flag_install in ./flag.install
Implementation of hook_install().

File

./flag.inc, line 177
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 factory_by_content_type($content_type) {
  return flag_create_handler($content_type);
}