You are here

function nodequeue_rules_action_info in Nodequeue 7.2

Implements hook_rules_action_info().

File

./nodequeue.rules.inc, line 238
Provides nodequeue (subqueue) rules integration.

Code

function nodequeue_rules_action_info() {
  return array(
    // Action: Add a given node to the given nodequeue.
    'nodequeue_action_add_node' => array(
      'label' => t('Add node to nodequeue'),
      'group' => t('Nodequeue'),
      'parameter' => array(
        'node' => array(
          'type' => 'node',
          'label' => t('Node'),
          'description' => t('The node you want to add.'),
        ),
        'queue' => array(
          'type' => 'text',
          'label' => t('Queue'),
          'description' => t('The queue where the node should be added to.'),
          'options list' => 'nodequeue_get_queue_names',
        ),
        'unique' => array(
          'type' => 'boolean',
          'label' => t('Prevent duplication'),
          'description' => t('Selecting this option will prevent the node from being added more than once to any subqueue.'),
          'default value' => TRUE,
        ),
      ),
    ),
    // Action: Remove the given node from the given nodequeue.
    'nodequeue_action_remove_node' => array(
      'label' => t('Remove node from nodequeue'),
      'group' => t('Nodequeue'),
      'parameter' => array(
        'node' => array(
          'type' => 'node',
          'label' => t('Node'),
          'description' => t('The node you want to remove.'),
        ),
        'queue' => array(
          'type' => 'text',
          'label' => t('Queue'),
          'description' => t('The queue where the node should be removed from.'),
          'options list' => 'nodequeue_get_queue_names',
        ),
      ),
    ),
  );
}