function flag_activity_api in Activity 7
Implements hook_activity_api() for flag module.
File
- ./
activity_contrib.module, line 11 - : Provides Activity integration for popular contrib modules.
Code
function flag_activity_api() {
// Figure out the activity access control realms.
$flags = flag_get_flags();
foreach ($flags as $fid => $flag) {
$realms["flag_" . $flag->fid] = $flag->title;
}
return array(
'api' => '3.0-alpha1',
'realms' => $realms,
'hooks' => array(
'flag_flag' => array(
'batch' => FALSE,
// ?? I believe this can be true.
'handler' => 'FlagActivityActionHandler',
'name' => 'Flag Entity',
),
'flag_unflag' => array(
'batch' => FALSE,
'handler' => 'FlagActivityActionHandler',
'name' => 'Unflag Entity',
),
),
'file' => drupal_get_path('module', 'activity_contrib') . '/modules/flag.activity.inc',
);
}