You are here

function uc_file_ca_action in Ubercart 6.2

Implements hook_ca_action().

File

uc_file/uc_file.ca.inc, line 102
This file contains the Conditional Actions hooks and functions necessary to make the file-related entity, conditions, events, and actions work.

Code

function uc_file_ca_action() {
  $actions['uc_file_order_renew'] = array(
    '#title' => t('Renew the files on an order.'),
    '#category' => t('renewal'),
    '#callback' => 'uc_file_action_order_renew',
    '#arguments' => array(
      'order' => array(
        '#entity' => 'uc_order',
        '#title' => t('Order'),
      ),
    ),
  );

  // Send an email to an order with a file expiration
  $actions['uc_file_order_email'] = array(
    '#title' => t('Send an order email regarding files.'),
    '#category' => t('Notification'),
    '#callback' => 'uc_file_action_order_email',
    '#arguments' => array(
      'order' => array(
        '#entity' => 'uc_order',
        '#title' => t('Order'),
      ),
      'expiration' => array(
        '#entity' => 'uc_file_expiration',
        '#title' => t('File expiration'),
      ),
    ),
  );
  return $actions;
}