You are here

function nodejs_actions_action_info in Node.js integration 6

Same name and namespace in other branches
  1. 7 nodejs_actions/nodejs_actions.module \nodejs_actions_action_info()

Implementation of hook_action_info().

File

nodejs_actions/nodejs_actions.module, line 6

Code

function nodejs_actions_action_info() {
  $actions = array(
    'realtime_taxonomy_action' => array(
      'description' => t('Publish realtime notifications of taxonomy activity.'),
      'type' => 'taxonomy',
      'configurable' => FALSE,
      'hooks' => array(
        'taxonomy' => array(
          'insert',
          'update',
          'delete',
        ),
      ),
    ),
    'realtime_comment_action' => array(
      'description' => t('Publish realtime notifications of comment activity.'),
      'type' => 'comment',
      'configurable' => FALSE,
      'hooks' => array(
        'comment' => array(
          'insert',
          'update',
          'delete',
          'view',
          'validate',
          'publish',
          'unpublish',
        ),
      ),
    ),
    'realtime_user_notification' => array(
      'description' => t('Publish realtime notifications of user activity.'),
      'type' => 'user',
      'configurable' => FALSE,
      'hooks' => array(
        'user' => array(
          'login',
          'logout',
          'insert',
          'delete',
          'update',
          'view',
        ),
      ),
    ),
    'realtime_node_notification' => array(
      'description' => t('Publish realtime notifications of node activity.'),
      'type' => 'node',
      'configurable' => FALSE,
      'hooks' => array(
        'nodeapi' => array(
          'view',
          'insert',
          'update',
          'delete',
        ),
      ),
    ),
  );
  if (module_exists('og')) {
    $actions += array(
      'realtime_og_user_insert_action' => array(
        'description' => t('Publish realtime notifications.'),
        'type' => 'og',
        'configurable' => FALSE,
        'hooks' => array(
          'og' => array(
            'user insert',
          ),
        ),
      ),
      'realtime_og_user_update_action' => array(
        'description' => t('Publish realtime notifications.'),
        'type' => 'og',
        'configurable' => FALSE,
        'hooks' => array(
          'og' => array(
            'user update',
          ),
        ),
      ),
      'realtime_og_user_delete_action' => array(
        'description' => t('Publish realtime notifications.'),
        'type' => 'og',
        'configurable' => FALSE,
        'hooks' => array(
          'og' => array(
            'user delete',
          ),
        ),
      ),
      'realtime_og_user_approve_action' => array(
        'description' => t('Publish realtime notifications.'),
        'type' => 'og',
        'configurable' => FALSE,
        'hooks' => array(
          'og' => array(
            'user approve',
          ),
        ),
      ),
      'realtime_og_user_deny_action' => array(
        'description' => t('Publish realtime notifications.'),
        'type' => 'og',
        'configurable' => FALSE,
        'hooks' => array(
          'og' => array(
            'user deny',
          ),
        ),
      ),
      'realtime_og_user_request_action' => array(
        'description' => t('Publish realtime notifications.'),
        'type' => 'og',
        'configurable' => FALSE,
        'hooks' => array(
          'og' => array(
            'user request',
          ),
        ),
      ),
      'realtime_og_user_admin_new_action' => array(
        'description' => t('Publish realtime notifications.'),
        'type' => 'og',
        'configurable' => FALSE,
        'hooks' => array(
          'og' => array(
            'admin new',
          ),
        ),
      ),
    );
  }
  if (module_exists('user_relationships_api')) {
    $actions += array(
      'realtime_user_relationships_type_presave_action' => array(
        'description' => t('Publish realtime notifications.'),
        'type' => 'user_relationships_api',
        'configurable' => FALSE,
        'hooks' => array(
          'user_relationships_api' => array(
            'type_presave',
          ),
        ),
      ),
      'realtime_user_relationships_type_insert_action' => array(
        'description' => t('Publish realtime notifications.'),
        'type' => 'user_relationships_api',
        'configurable' => FALSE,
        'hooks' => array(
          'user_relationships_api' => array(
            'type_insert',
          ),
        ),
      ),
      'realtime_user_relationships_type_update_action' => array(
        'description' => t('Publish realtime notifications.'),
        'type' => 'user_relationships_api',
        'configurable' => FALSE,
        'hooks' => array(
          'user_relationships_api' => array(
            'type_update',
          ),
        ),
      ),
      'realtime_user_relationships_type_delete_action' => array(
        'description' => t('Publish realtime notifications.'),
        'type' => 'user_relationships_api',
        'configurable' => FALSE,
        'hooks' => array(
          'user_relationships_api' => array(
            'type_delete',
          ),
        ),
      ),
      'realtime_user_relationships_type_load_action' => array(
        'description' => t('Publish realtime notifications.'),
        'type' => 'user_relationships_api',
        'configurable' => FALSE,
        'hooks' => array(
          'user_relationships_api' => array(
            'type_load',
          ),
        ),
      ),
      'realtime_user_relationships_presave_action' => array(
        'description' => t('Publish realtime notifications.'),
        'type' => 'user_relationships_api',
        'configurable' => FALSE,
        'hooks' => array(
          'user_relationships_api' => array(
            'presave',
          ),
        ),
      ),
      'realtime_user_relationships_request_action' => array(
        'description' => t('Publish realtime notifications.'),
        'type' => 'user_relationships_api',
        'configurable' => FALSE,
        'hooks' => array(
          'user_relationships_api' => array(
            'request',
          ),
        ),
      ),
      'realtime_user_relationships_cancel_action' => array(
        'description' => t('Publish realtime notifications.'),
        'type' => 'user_relationships_api',
        'configurable' => FALSE,
        'hooks' => array(
          'user_relationships_api' => array(
            'cancel',
          ),
        ),
      ),
      'realtime_user_relationships_update_action' => array(
        'description' => t('Publish realtime notifications.'),
        'type' => 'user_relationships_api',
        'configurable' => FALSE,
        'hooks' => array(
          'user_relationships_api' => array(
            'update',
          ),
        ),
      ),
      'realtime_user_relationships_approve_action' => array(
        'description' => t('Publish realtime notifications.'),
        'type' => 'user_relationships_api',
        'configurable' => FALSE,
        'hooks' => array(
          'user_relationships_api' => array(
            'approve',
          ),
        ),
      ),
      'realtime_user_relationships_disapprove_action' => array(
        'description' => t('Publish realtime notifications.'),
        'type' => 'user_relationships_api',
        'configurable' => FALSE,
        'hooks' => array(
          'user_relationships_api' => array(
            'disapprove',
          ),
        ),
      ),
      'realtime_user_relationships_remove_action' => array(
        'description' => t('Publish realtime notifications.'),
        'type' => 'user_relationships_api',
        'configurable' => FALSE,
        'hooks' => array(
          'user_relationships_api' => array(
            'remove',
          ),
        ),
      ),
    );
  }
  return $actions;
}