Skip to content

Instantly share code, notes, and snippets.

@codev0
Created November 7, 2016 03:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codev0/0abe0873fd1160b3afba6d34eae7f31c to your computer and use it in GitHub Desktop.
Save codev0/0abe0873fd1160b3afba6d34eae7f31c to your computer and use it in GitHub Desktop.
function sl_kz_calc_menu()
{
$items = array();
$items['admin/config/system/sl-calc-kz'] = array(
'title' => 'Delivery in KZ',
'description' => 'Spark logistics delivery in KZ calculator.',
'type' => MENU_NORMAL_ITEM,
'page callback' => 'sl_kz_calc_page',
'access arguments' => array('administer calculators'),
'file' => 'sl_kz_calc.page.inc',
'file path' => drupal_get_path('module', 'sl_kz_calc'),
);
$items['admin/config/system/sl-calc-kz/index'] = array(
'title' => 'Delivery in KZ',
'description' => 'Spark logistics delivery in KZ calculator.',
'type' => MENU_DEFAULT_LOCAL_TASK,
'access arguments' => array('administer calculators'),
);
$items['admin/config/system/sl-calc-kz/add'] = array(
'title' => 'Add city',
'page callback' => 'sl_kz_city_add_page',
'access arguments' => array('administer menu'),
'type' => MENU_LOCAL_TASK,
'weight' => 5,
'file' => 'sl_kz_calc_add.page.inc',
'file path' => drupal_get_path('module', 'sl_kz_calc'),
);
$items['sl-calc-kz'] = array(
'title' => 'Asd',
'description' => 'Spark logistics delivery in KZ calculator.',
'page callback' => 'sl_kz_calc_calculator_page',
'access arguments' => true,
'file' => 'sl_kz_calc_index.page.inc',
'file path' => drupal_get_path('module', 'sl_kz_calc'),
);
return $items;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment