function javascript_libraries_menu in JavaScript Libraries Manager 7
Implements hook_menu().
File
- ./
javascript_libraries.module, line 11 - Toggle the inclusion of Drupal system libraries. Upload and reference custom libraries as well.
Code
function javascript_libraries_menu() {
$items = array();
$items['admin/config/system/javascript-libraries'] = array(
'title' => 'JavaScript libraries',
'description' => 'Manage Drupal and custom JavaScript libraries.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'javascript_libraries_default_form',
),
'access arguments' => array(
'administer site configuration',
),
'file' => 'javascript_libraries.admin.inc',
);
$items['admin/config/system/javascript-libraries/default'] = array(
'title' => 'Built-in',
'weight' => -5,
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['admin/config/system/javascript-libraries/custom'] = array(
'title' => 'Custom',
'description' => 'Manage Drupal and custom javascript libraries',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'javascript_libraries_custom_form',
),
'access arguments' => array(
'administer site configuration',
),
'type' => MENU_LOCAL_TASK,
'file' => 'javascript_libraries.admin.inc',
);
$items['admin/config/system/javascript-libraries/custom/add'] = array(
'title' => 'Add JavaScript',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'javascript_libraries_edit_form',
array(),
),
'access arguments' => array(
'administer site configuration',
),
'type' => MENU_LOCAL_ACTION,
'file' => 'javascript_libraries.admin.inc',
);
$items['admin/config/system/javascript-libraries/custom/%javascript_libraries_custom/edit'] = array(
'title' => 'Edit JavaScript library',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'javascript_libraries_edit_form',
5,
),
'access arguments' => array(
'administer site configuration',
),
'type' => MENU_VISIBLE_IN_BREADCRUMB,
'file' => 'javascript_libraries.admin.inc',
);
$items['admin/config/system/javascript-libraries/custom/%javascript_libraries_custom/delete'] = array(
'title' => 'Edit JavaScript library',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'javascript_libraries_delete_form',
5,
),
'access arguments' => array(
'administer site configuration',
),
'type' => MENU_VISIBLE_IN_BREADCRUMB,
'file' => 'javascript_libraries.admin.inc',
);
return $items;
}