You are here

function uc_file_rules_action_info in Ubercart 7.3

Same name and namespace in other branches
  1. 8.4 uc_file/uc_file.rules.inc \uc_file_rules_action_info()

Implements hook_rules_action_info().

File

uc_file/uc_file.rules.inc, line 128
Rules hooks and functions for uc_file.module.

Code

function uc_file_rules_action_info() {

  // Renew file expirations.
  $actions['uc_file_order_renew'] = array(
    'label' => t('Renew the files on an order.'),
    'group' => t('renewal'),
    'base' => 'uc_file_action_order_renew',
    'parameter' => array(
      'order' => array(
        'type' => 'uc_order',
        'label' => t('Order'),
      ),
    ),
  );

  // Send an email to an order with a file expiration.
  $actions['uc_file_order_email'] = array(
    'label' => t('Send an order email regarding files.'),
    'group' => t('Notification'),
    'base' => 'uc_file_action_order_email',
    'parameter' => array(
      'order' => array(
        'type' => 'uc_order',
        'label' => t('Order'),
      ),
      'expiration' => array(
        'type' => 'uc_file_expiration',
        'label' => t('File expiration'),
      ),
      'from' => array(
        'type' => 'text',
        'label' => t('Sender'),
      ),
      'addresses' => array(
        'type' => 'text',
        'label' => t('Recipients'),
      ),
      'subject' => array(
        'type' => 'text',
        'label' => t('Subject'),
      ),
      'message' => array(
        'type' => 'text',
        'label' => t('Message'),
      ),
      'format' => array(
        'type' => 'text',
        'label' => t('Message format'),
        'options list' => 'uc_file_message_formats',
      ),
    ),
  );
  return $actions;
}