You are here

function uc_quote_event_info in Ubercart 5

Implementation of hook_event_info().

Register an event for each shipping method. Enabled methods have active configurations.

File

shipping/uc_quote/uc_quote.module, line 254
The controller module for fulfillment modules that process physical goods.

Code

function uc_quote_event_info() {
  $methods = module_invoke_all('shipping_method');
  $events = array();
  foreach ($methods as $id => $method) {
    $events['get_quote_from_' . $id] = array(
      '#label' => t('Getting shipping quote via !method', array(
        '!method' => $method['title'],
      )),
      '#module' => t('Quote'),
      '#arguments' => array(
        'order' => array(
          '#entity' => 'order',
          '#label' => t('Order'),
        ),
        'method' => array(
          '#entity' => 'quote_method',
          '#label' => t('Quote method'),
        ),
        'account' => array(
          '#entity' => 'user',
          '#label' => t('User account'),
        ),
      ),
    );
  }
  return $events;
}