You are here

function flag_flag_definitions in Flag 6

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

Implementation of hook_flag_definitions().

Defines the flags this module implements.

Return value

An "array of arrays", keyed by content-types. The 'handler' slot should point to the PHP class implementing this flag.

1 call to flag_flag_definitions()
flag_fetch_definition in ./flag.inc
Returns a flag definition.

File

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

Code

function flag_flag_definitions() {
  return array(
    'node' => array(
      'title' => t('Nodes'),
      'description' => t("Nodes are a Drupal site's primary content."),
      'handler' => 'flag_node',
    ),
    'comment' => array(
      'title' => t('Comments'),
      'description' => t('Comments are responses to node content.'),
      'handler' => 'flag_comment',
    ),
    'user' => array(
      'title' => t('Users'),
      'description' => t('Users who have created accounts on your site.'),
      'handler' => 'flag_user',
    ),
  );
}