You are here

function node_activity_api in Activity 7

Implements hook_activity_api().

File

./activity.module, line 406
Records Activity across the site and surfaces that to Views.

Code

function node_activity_api() {
  return array(
    'api' => '3.0-alpha1',
    'realms' => array(
      'node_author' => array(
        'name' => 'Node Author',
      ),
    ),
    'hooks' => array(
      'node_insert' => array(
        'batch' => TRUE,
        'handler' => 'NodeActivityActionHandler',
        'name' => 'Node Insert',
      ),
      'node_view' => array(
        // The current_user key can be replaced with the user loaded from
        // {history} table.
        'batch' => FALSE,
        'handler' => 'NodeActivityActionHandler',
        'name' => 'Node View',
      ),
      'node_update' => array(
        'batch' => FALSE,
        'handler' => 'NodeActivityActionHandler',
        'name' => 'Node Update',
      ),
    ),
    // Move the activity hooks into a seperate file.
    'file' => drupal_get_path('module', 'activity') . '/modules/node.activity.inc',
  );
}