You are here

function ca_ca_action in Ubercart 6.2

Implements hook_ca_action().

Demonstrates defining an action for predicates to use; primarily specifies a callback function to perform the action and an array that specifies arguments and their data types.

File

ca/ca.ca.inc, line 95
This file includes some generic conditions and actions.

Code

function ca_ca_action() {
  $actions['ca_drupal_set_message'] = array(
    '#title' => t('Display a message to the user'),
    '#category' => t('Drupal'),
    '#callback' => 'ca_action_drupal_set_message',
    '#arguments' => array(),
  );
  $actions['ca_action_custom_php'] = array(
    '#title' => t('Execute custom PHP code'),
    '#category' => t('System'),
    '#callback' => 'ca_action_custom_php',
    '#arguments' => array(
      'arguments' => array(
        '#entity' => 'arguments',
        '#title' => t('Arguments'),
      ),
    ),
  );
  return $actions;
}