function uc_quote_ca_trigger in Ubercart 6.2
Implements hook_ca_trigger().
Registers an event for each shipping method. Enabled methods have active configurations.
File
- shipping/
uc_quote/ uc_quote.module, line 253 - The controller module for fulfillment modules that process physical goods.
Code
function uc_quote_ca_trigger() {
$methods = module_invoke_all('shipping_method');
$triggers = array();
foreach ($methods as $id => $method) {
$triggers['get_quote_from_' . $id] = array(
'#title' => t('Getting shipping quote via !method', array(
'!method' => $method['title'],
)),
'#category' => t('Quote'),
'#hidden' => TRUE,
'#arguments' => array(
'order' => array(
'#entity' => 'uc_order',
'#title' => t('Order'),
),
'method' => array(
'#entity' => 'quote_method',
'#title' => t('Quote method'),
),
'account' => array(
'#entity' => 'user',
'#title' => t('User account'),
),
),
);
}
return $triggers;
}