You are here

function push_notifications_rules_action_info in Push Notifications 7

Implements hook_rules_action_info().

File

./push_notifications.rules.inc, line 11
Administration Events Rule for Push Notifications.

Code

function push_notifications_rules_action_info() {
  $items = array();
  $items['push_notifications_send_message_account'] = array(
    'label' => t('Send a push notification to a user account'),
    'group' => t('Push notification'),
    'parameter' => array(
      'account' => array(
        'type' => 'user',
        'label' => t('User Account'),
        'description' => t('Specify the recipient account for this message.'),
      ),
      'message' => array(
        'type' => 'text',
        'label' => t('Notification message'),
      ),
    ),
  );
  $items['push_notifications_send_message_bulk'] = array(
    'label' => t('Send a push notification to all registered tokens'),
    'group' => t('Push notification'),
    'parameter' => array(
      'message' => array(
        'type' => 'text',
        'label' => t('Notification message'),
      ),
      'target_group' => array(
        'type' => 'text',
        'label' => t('Target Group'),
        'description' => t('Select which user group this message should be delivered to.'),
        'options list' => 'push_notifications_target_group_options',
        'restriction' => 'input',
        'default value' => 'any',
        'optional' => TRUE,
      ),
    ),
  );
  return $items;
}