You are here

function commerce_cp_get_system_panes in Commerce Cart Pane 7

Get a list of system cart panes: 1) Line items table (output) 2) Summary (Order total) 3) Submit buttons (actions)

$only_keys boolean

3 calls to commerce_cp_get_system_panes()
commerce_cp_commerce_cp_info in ./commerce_cp.module
Implements hook_commerce_cp_info().
commerce_cp_form_alter in ./commerce_cp.module
Implements hook_form_alter().
commerce_cp_install in ./commerce_cp.install
Implements hook_install().

File

./commerce_cp.module, line 237

Code

function commerce_cp_get_system_panes($only_keys = FALSE) {
  $cart_panes = array();
  $cart_panes['output'] = array(
    'page' => 'cart',
    'weight' => 0,
    'name' => t('Line items table'),
    'system' => TRUE,
  );
  $cart_panes['summary'] = array(
    'page' => 'cart',
    'weight' => 1,
    'warning message' => t('(cannot be disabled)'),
    // cannot be disabled. only through Cart view
    'name' => t('Summary'),
    'settings form' => 'commerce_cp_summary_settings_form',
    'system' => TRUE,
  );
  $cart_panes['actions'] = array(
    'page' => 'cart',
    'weight' => 2,
    'name' => t('Submit buttons'),
    'system' => TRUE,
  );
  if ($only_keys) {
    return array_keys($cart_panes);
  }
  return $cart_panes;
}