function commerce_cop_menu in Commerce Custom Offline Payments 7
Implements hook_menu().
File
- ./
commerce_cop.module, line 14 - Custom offline payment methods for Drupal Commerce.
Code
function commerce_cop_menu() {
$items = array();
$items['admin/commerce/config/custom-offline-payments'] = array(
'title' => 'Custom Offline Payments',
'description' => 'Manage custom offline payment methods',
'access arguments' => array(
'administer custom offline payments',
),
'file' => 'commerce_cop.admin.inc',
'page callback' => 'commerce_cop_admin_overview',
'weight' => 3,
);
$items['admin/commerce/config/custom-offline-payments/add'] = array(
'title' => 'Add payment method',
'access arguments' => array(
'administer custom offline payments',
),
'file' => 'commerce_cop.admin.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'commerce_cop_edit_payment_form',
),
'type' => MENU_LOCAL_ACTION,
);
$items['admin/commerce/config/custom-offline-payments/%custom_offline_payment'] = array(
'title' => 'Edit payment method',
'access arguments' => array(
'administer custom offline payments',
),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'commerce_cop_edit_payment_form',
4,
),
'file' => 'commerce_cop.admin.inc',
);
$items['admin/commerce/config/custom-offline-payments/%custom_offline_payment/edit'] = array(
'title' => 'Edit',
'type' => MENU_DEFAULT_LOCAL_TASK,
'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
'weight' => 0,
);
$items['admin/commerce/config/custom-offline-payments/%custom_offline_payment/delete'] = array(
'title' => 'Delete',
'access arguments' => array(
'administer custom offline payments',
),
'file' => 'commerce_cop.admin.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'commerce_cop_delete_payment_form',
4,
),
'type' => MENU_LOCAL_TASK,
'context' => MENU_CONTEXT_INLINE,
'weight' => 10,
);
// Add a menu item for capturing authorizations.
$items['admin/commerce/orders/%commerce_order/payment/%commerce_payment_transaction/offline-payment-confirm'] = array(
'title' => 'Confirm payment',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'commerce_cop_confirm_payment_form',
3,
5,
),
'access callback' => 'commerce_cop_payment_access',
'access arguments' => array(
3,
5,
),
'type' => MENU_LOCAL_TASK,
'context' => MENU_CONTEXT_INLINE,
'weight' => 2,
);
return $items;
}