You are here

activity_contrib.module in Activity 7

: Provides Activity integration for popular contrib modules.

File

activity_contrib.module
View source
<?php

// $Id: $

/**
 * @file:
 * Provides Activity integration for popular contrib modules.
 */

/**
 * Implements hook_activity_api() for flag module.
 */
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',
  );
}

Functions

Namesort descending Description
flag_activity_api Implements hook_activity_api() for flag module.