You are here

function modal_message_rules_action_info in Modal operations 7

Implements hook_rules_action_info().

File

modal_message/modal_message.rules.inc, line 6

Code

function modal_message_rules_action_info() {
  return array(
    'modal_message_drupal_message' => array(
      'label' => t('Show a popup message on the site'),
      'group' => t('System'),
      'parameter' => array(
        'message' => array(
          'type' => 'text',
          'label' => t('Message'),
          'sanitize' => TRUE,
          'translatable' => TRUE,
        ),
        'type' => array(
          'type' => 'token',
          'label' => t('Message type'),
          'options list' => 'modal_message_message_types',
          'default value' => 'modal-status',
          'optional' => TRUE,
        ),
        'repeat' => array(
          'type' => 'boolean',
          'label' => t('Repeat message'),
          'description' => t("If disabled and the message has been already shown, then the message won't be repeated."),
          'default value' => TRUE,
          'optional' => TRUE,
          'restriction' => 'input',
        ),
      ),
    ),
  );
}