View source
<?php
function commerce_devel_menu() {
$items = array();
$token_exists = module_exists('token');
if (module_exists('commerce_order_ui')) {
$items['admin/commerce/orders/%commerce_order/devel'] = array(
'title' => 'Devel',
'page callback' => 'devel_load_object',
'page arguments' => array(
'commerce_order',
3,
),
'access arguments' => array(
'access devel information',
),
'type' => MENU_LOCAL_TASK,
'weight' => 100,
'file' => 'devel.pages.inc',
'file path' => drupal_get_path('module', 'devel'),
);
$items['admin/commerce/orders/%commerce_order/devel/load'] = array(
'title' => 'Load',
'type' => MENU_DEFAULT_LOCAL_TASK,
);
if ($token_exists) {
$items['admin/commerce/orders/%commerce_order/devel/token'] = array(
'title' => 'Tokens',
'page callback' => 'token_devel_token_object',
'page arguments' => array(
'commerce_order',
3,
),
'access arguments' => array(
'access devel information',
),
'type' => MENU_LOCAL_TASK,
'file' => 'token.pages.inc',
'file path' => drupal_get_path('module', 'token'),
'weight' => 5,
);
}
}
if (module_exists('commerce_customer_ui')) {
$items['admin/commerce/customer-profiles/%commerce_customer_profile/devel'] = array(
'title' => 'Devel',
'page callback' => 'devel_load_object',
'page arguments' => array(
'commerce_customer_profile',
3,
),
'access arguments' => array(
'access devel information',
),
'type' => MENU_LOCAL_TASK,
'weight' => 100,
'file' => 'devel.pages.inc',
'file path' => drupal_get_path('module', 'devel'),
);
$items['admin/commerce/customer-profiles/%commerce_customer_profile/devel/load'] = array(
'title' => 'Load',
'type' => MENU_DEFAULT_LOCAL_TASK,
);
if ($token_exists) {
$items['admin/commerce/customer-profiles/%commerce_customer_profile/devel/token'] = array(
'title' => 'Tokens',
'page callback' => 'token_devel_token_object',
'page arguments' => array(
'commerce_customer_profile',
3,
),
'access arguments' => array(
'access devel information',
),
'type' => MENU_LOCAL_TASK,
'file' => 'token.pages.inc',
'file path' => drupal_get_path('module', 'token'),
'weight' => 5,
);
}
}
if (module_exists('commerce_payment_ui')) {
$items['admin/commerce/orders/%commerce_order/payment/%commerce_payment_transaction/devel'] = array(
'title' => 'Devel',
'page callback' => 'devel_load_object',
'page arguments' => array(
'commerce_payment_transaction',
5,
),
'access arguments' => array(
'access devel information',
),
'type' => MENU_LOCAL_TASK,
'weight' => 100,
'file' => 'devel.pages.inc',
'file path' => drupal_get_path('module', 'devel'),
);
$items['admin/commerce/orders/%commerce_order/payment/%commerce_payment_transaction/devel/load'] = array(
'title' => 'Load',
'type' => MENU_DEFAULT_LOCAL_TASK,
);
if ($token_exists) {
$items['admin/commerce/orders/%commerce_order/payment/%commerce_payment_transaction/devel/token'] = array(
'title' => 'Tokens',
'page callback' => 'token_devel_token_object',
'page arguments' => array(
'commerce_payment_transaction',
5,
),
'access arguments' => array(
'access devel information',
),
'type' => MENU_LOCAL_TASK,
'file' => 'token.pages.inc',
'file path' => drupal_get_path('module', 'token'),
'weight' => 5,
);
}
}
if (module_exists('commerce_product_ui')) {
$items['admin/commerce/products/%commerce_product/devel'] = array(
'title' => 'Devel',
'page callback' => 'devel_load_object',
'page arguments' => array(
'commerce_product',
3,
),
'access arguments' => array(
'access devel information',
),
'type' => MENU_LOCAL_TASK,
'weight' => 100,
'file' => 'devel.pages.inc',
'file path' => drupal_get_path('module', 'devel'),
);
$items['admin/commerce/products/%commerce_product/devel/load'] = array(
'title' => 'Load',
'type' => MENU_DEFAULT_LOCAL_TASK,
);
if ($token_exists) {
$items['admin/commerce/products/%commerce_product/devel/token'] = array(
'title' => 'Tokens',
'page callback' => 'token_devel_token_object',
'page arguments' => array(
'commerce_product',
3,
),
'access arguments' => array(
'access devel information',
),
'type' => MENU_LOCAL_TASK,
'file' => 'token.pages.inc',
'file path' => drupal_get_path('module', 'token'),
'weight' => 5,
);
}
}
if (module_exists('commerce_cart')) {
$items['cart/line-items/%commerce_line_item/devel'] = array(
'title' => 'Devel',
'page callback' => 'devel_load_object',
'page arguments' => array(
'commerce_line_item',
2,
),
'access arguments' => array(
'access devel information',
),
'type' => MENU_LOCAL_TASK,
'weight' => 100,
'file' => 'devel.pages.inc',
'file path' => drupal_get_path('module', 'devel'),
);
$items['cart/line-items/%commerce_line_item/devel/load'] = array(
'title' => 'Load',
'type' => MENU_DEFAULT_LOCAL_TASK,
);
if ($token_exists) {
$items['cart/line-items/%commerce_line_item/devel/token'] = array(
'title' => 'Tokens',
'page callback' => 'token_devel_token_object',
'page arguments' => array(
'commerce_line_item',
2,
),
'access arguments' => array(
'access devel information',
),
'type' => MENU_LOCAL_TASK,
'file' => 'token.pages.inc',
'file path' => drupal_get_path('module', 'token'),
'weight' => 5,
);
}
}
return $items;
}