function uc_file_rules_action_info in Ubercart 8.4
Same name and namespace in other branches
- 7.3 uc_file/uc_file.rules.inc \uc_file_rules_action_info()
Implements hook_rules_action_info().
File
- uc_file/
uc_file.rules.inc, line 130 - Rules hooks and functions for uc_file.module.
Code
function uc_file_rules_action_info() {
// Renew file expirations.
$actions['uc_file_order_renew'] = [
'label' => t('Renew the files on an order.'),
'group' => t('renewal'),
'base' => 'uc_file_action_order_renew',
'parameter' => [
'order' => [
'type' => 'uc_order',
'label' => t('Order'),
],
],
];
// Send an email to an order with a file expiration.
$actions['uc_file_order_email'] = [
'label' => t('Send an order email regarding files.'),
'group' => t('Notification'),
'base' => 'uc_file_action_order_email',
'parameter' => [
'order' => [
'type' => 'uc_order',
'label' => t('Order'),
],
'expiration' => [
'type' => 'uc_file_expiration',
'label' => t('File expiration'),
],
'from' => [
'type' => 'text',
'label' => t('Sender'),
],
'addresses' => [
'type' => 'text',
'label' => t('Recipients'),
],
'subject' => [
'type' => 'text',
'label' => t('Subject'),
],
'message' => [
'type' => 'text',
'label' => t('Message'),
],
'format' => [
'type' => 'text',
'label' => t('Message format'),
'options list' => 'uc_file_message_formats',
],
],
];
return $actions;
}