function ccl_menu in Custom Contextual Links 7
Same name and namespace in other branches
- 8 ccl.module \ccl_menu()
Implements hook_menu().
File
- ./
ccl.module, line 21 - Main CCL module file.
Code
function ccl_menu() {
$items['admin/config/user-interface/ccl'] = array(
'title' => 'Custom Contextual Links',
'description' => 'Add custom contextul links to blocks and nodes',
'page callback' => 'ccl_admin',
'access arguments' => array(
'use ccl',
),
'file' => 'ccl.admin.inc',
);
$items['admin/config/user-interface/ccl/add'] = array(
'title' => 'Add new link',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'ccl_add_form',
),
'access arguments' => array(
'use ccl',
),
'type' => MENU_LOCAL_ACTION,
'file' => 'ccl.admin.inc',
);
$items['admin/config/user-interface/ccl/%/delete'] = array(
'title' => 'Delete custom link',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'ccl_delete_confirm',
4,
),
'access arguments' => array(
'use ccl',
),
'file' => 'ccl.admin.inc',
);
$items['admin/config/user-interface/ccl/%/edit'] = array(
'title' => 'Edit custom link',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'ccl_add_form',
4,
),
'access arguments' => array(
'use ccl',
),
'file' => 'ccl.admin.inc',
);
$items['admin/config/user-interface/ccl/autocomplete'] = array(
'title' => 'Node autocomplete',
'page callback' => 'ccl_node_autocomplete',
'access arguments' => array(
'use ccl',
),
'file' => 'ccl.admin.inc',
'type' => MENU_CALLBACK,
);
return $items;
}