You are here

function nodejs_actions_action_info in Node.js integration 7

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

Implements hook_action_info().

File

nodejs_actions/nodejs_actions.module, line 6

Code

function nodejs_actions_action_info() {
  $actions = array();
  $triggers = module_invoke_all('trigger_info');
  drupal_alter('trigger_info', $triggers);
  foreach (array(
    'node',
    'user',
    'comment',
  ) as $type) {
    $actions['nodejs_actions_' . $type . '_action'] = array(
      'type' => $type,
      'triggers' => array_keys($triggers[$type]),
      'label' => t('Publish realtime notifications of @type activity.', array(
        '@type' => $type,
      )),
      'configurable' => FALSE,
    );
  }
  return $actions;
}