You are here

function purr_messages_rules_action_info in Purr Messages 7.2

Same name and namespace in other branches
  1. 8.2 purr_messages.rules.inc \purr_messages_rules_action_info()
  2. 6.2 purr_messages.rules.inc \purr_messages_rules_action_info()
  3. 7 purr_messages.rules.inc \purr_messages_rules_action_info()

Implements hook_rules_action_info().

Return value

array

File

./purr_messages.rules.inc, line 8

Code

function purr_messages_rules_action_info() {
  return array(
    'purr_message' => array(
      'label' => t('Show a purr style message on the site'),
      'group' => t('System'),
      'parameter' => array(
        'message' => array(
          'type' => 'text',
          'label' => t('Message'),
          'sanitize' => TRUE,
        ),
        'type' => array(
          'type' => 'text',
          'label' => t('Type'),
          'description' => t("The type of message determines which class(es) will\n            be added to the message div and therefore which colour they will be.\n            Usually just 'status', 'error', or 'warning', but you can also make a\n            message which will remain by using the type 'sticky'."),
          'default value' => 'status',
          'sanitize' => TRUE,
        ),
        'repeat' => array(
          'type' => 'boolean',
          'label' => t('Repeat message'),
          'description' => t("If disabled and the message has been already shown,\n            then the message won't be repeated."),
          'default value' => TRUE,
          'optional' => TRUE,
          'restriction' => 'input',
        ),
      ),
      'base' => 'purr_messages_drupal_message',
      'access callback' => 'rules_system_integration_access',
    ),
  );
}