You are here

function protected_node_rules_rules_action_info in Protected Node 6

Same name and namespace in other branches
  1. 7 protected_node_rules/protected_node_rules.rules.inc \protected_node_rules_rules_action_info()
  2. 1.0.x protected_node_rules/protected_node_rules.rules.inc \protected_node_rules_rules_action_info()

Implementation of hook_rules_action_info(). List of protected node actions.

File

./protected_node_rules.rules.inc, line 61
Rules integration for the protected_node module.

Code

function protected_node_rules_rules_action_info() {
  $defaults = array(
    'arguments' => array(
      'node' => array(
        'type' => 'node',
        'label' => t('Content'),
      ),
    ),
    'module' => 'Protected node',
  );
  $items['protected_node_rules_action_protect'] = array(
    'label' => t('Protect node'),
  ) + $defaults;
  $items['protected_node_rules_action_password_protect'] = array(
    'arguments' => array(
      'node' => array(
        'type' => 'node',
        'label' => t('Content'),
      ),
      'passwd' => array(
        'type' => 'string',
        'label' => t('Password'),
      ),
    ),
    'label' => t('Password protect node'),
  ) + $defaults;
  $items['protected_node_rules_action_unprotect'] = array(
    'label' => t('Unprotect the node'),
  ) + $defaults;
  $items['protected_node_rules_action_lock'] = array(
    'label' => t('Lock the node away from current user'),
  ) + $defaults;
  $items['protected_node_rules_action_unlock'] = array(
    'label' => t('Unlock the node for current user'),
  ) + $defaults;
  return $items;
}