You are here

function uc_stock_configuration in Ubercart 5

Implementation of hook_configuration().

File

uc_stock/uc_stock_workflow.inc, line 17
This file contains all the Workflow-NG hooks that are neccesary for Workflow integeration with the uc_stock module

Code

function uc_stock_configuration() {
  $configurations = array();
  $configurations['uc_stock_decrement_on_order'] = array(
    '#label' => t('Decrement stock upon order submission'),
    '#event' => 'checkout_complete',
    '#module' => 'uc_stock',
  );
  $action = workflow_ng_use_action('uc_stock_action_decrement_stock', array(
    '#label' => t('Decrement stock of products in order'),
    '#arguments' => array(
      'order' => array(
        '#entity' => 'order',
        '#label' => t('Order'),
      ),
    ),
  ));
  $configurations['uc_stock_decrement_on_order'] = workflow_ng_configure($configurations['uc_stock_decrement_on_order'], $action);
  return $configurations;
}