You are here

function og_activity_info in Organic groups 6.2

Implementation of hook_activity_info().

File

./og.module, line 264
Code for the Organic Groups module.

Code

function og_activity_info() {
  $info = new stdClass();
  $info->api = 2;
  $info->name = 'Organic groups';
  $info->object_type = 'node';
  $info->path = drupal_get_path('module', 'og') . '/includes';

  // The array keys are the form labels.
  $info->objects = array(
    'group administrators' => 'node',
    'acting user' => 'user',
  );

  // The one hook and all of its $op's.
  $info->hooks = array(
    'og' => array(
      'user insert',
      'user update',
      'user delete',
      'user approve',
      'user deny',
      'user request',
      'admin new',
      'admin remove',
    ),
  );

  // The eid_field is the entity id field. This is used by modules to delete
  // activities. For Organic groups, the eid_field would be 'nid'. But since
  // Activity module already handles the deletion of activities when their nodes
  // are deleted, the eid_field is set to NULL.
  $info->eid_field = NULL;
  $info->realms = array(
    'og_member' => 'Organic groups membership',
  );
  return $info;
}