function _customer_profile_type_ui_store_checkout_pane_contexts in Customer Profile Type UI 7
Helper function to store the original checkout panes before altering them, so that we can call the proper CALLBACK functions later on.
Return value
An array of checkout profile pane definitions indexed by customer profile type.
6 calls to _customer_profile_type_ui_store_checkout_pane_contexts()
- customer_profile_type_ui_commerce_checkout_pane_info_alter in ./
customer_profile_type_ui.module - Implements hook_commerce_checkout_pane_info_alter().
- customer_profile_type_ui_pane_checkout_form in includes/
customer_profile_type_ui.checkout_pane.inc - Checkout pane callback: returns a customer profile edit form.
- customer_profile_type_ui_pane_checkout_form_submit in includes/
customer_profile_type_ui.checkout_pane.inc - Checkout pane callback: submits a customer profile edit form.
- customer_profile_type_ui_pane_checkout_form_validate in includes/
customer_profile_type_ui.checkout_pane.inc - Checkout pane callback: validates a customer profile edit form.
- customer_profile_type_ui_pane_review in includes/
customer_profile_type_ui.checkout_pane.inc - Checkout pane callback: returns the cart contents review data for the Review checkout pane.
File
- ./
customer_profile_type_ui.module, line 152 - CUSTOMER PROFILE TYPES UI: Provides a UI for adding new customer profile types.
Code
function _customer_profile_type_ui_store_checkout_pane_contexts($checkout_panes = NULL) {
$original_panes =& drupal_static(__FUNCTION__);
if (!isset($original_panes)) {
// Merge in default callbacks if they hadn't been previously set.
foreach (commerce_customer_profile_types() as $type => $profile_type) {
foreach (array(
'settings_form',
'checkout_form',
'checkout_form_validate',
'checkout_form_submit',
'review',
) as $callback) {
if (!isset($checkout_panes['customer_profile_' . $type]['callbacks'][$callback])) {
$checkout_panes['customer_profile_' . $type]['callbacks'][$callback] = $checkout_panes['customer_profile_' . $type]['base'] . '_' . $callback;
}
}
}
$original_panes = $checkout_panes;
}
return $original_panes;
}