You are here

function comment_activity_info in Activity 6.2

File

./activity.module, line 80
Primarily Drupal hooks and global API functions to manipulate activity.

Code

function comment_activity_info() {
  $info = _activity_activity_info();
  $info->name = 'comment';
  $info->object_type = 'comment';
  $info->objects = array(
    'comment author' => 'comment',
    'node author' => 'node',
    'comment author is the node author' => 'node_comment_author',
  );

  // array key is the label
  $info->hooks = array(
    'comment' => array(
      'insert',
      'update',
    ),
  );
  $info->realms = array(
    'comment' => 'Comment',
  );

  // do we need a t()?
  $info->eid_field = 'cid';
  foreach (node_get_types() as $type) {
    $info->type_options[$type->type] = t($type->name);
  }
  $info->list_callback = 'comment_list_activity_actions';
  $info->context_load_callback = 'comment_load_activity_context';
  return $info;
}