-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfeatures_profiler.module
53 lines (52 loc) · 1.84 KB
/
features_profiler.module
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
/**
* Implements hook_menu().
*/
function features_profiler_menu() {
$items = array();
$items['admin/structure/features/profiler'] = array(
'title' => 'Profiler',
'description' => 'View collection of features in a human friendly way.',
// 'page callback' => 'drupal_get_form',
// 'page arguments' => array('features_profiler_form'),
'page callback' => 'features_profiler_scribbler',
'type' => MENU_LOCAL_TASK,
'file' => 'features_profiler.pages.inc',
'weight' => 20,
);
$items['admin/structure/features/profiler/view'] = array(
'title' => 'View',
'description' => 'View collection of features in a human friendly way.',
'page callback' => 'drupal_get_form',
'page arguments' => array('features_profiler_form'),
'type' => MENU_DEFAULT_LOCAL_TASK,
'file' => 'features_profiler.pages.inc',
'weight' => 0,
);
$items['admin/structure/features/profiler/settings'] = array(
'title' => 'Settings',
'description' => 'Configure display settings for Feature Profiler.',
'page callback' => 'drupal_get_form',
'page arguments' => array('features_settings_form'),
'type' => MENU_LOCAL_TASK,
'file' => 'features_profiler.pages.inc',
'weight' => 10,
);
$items['admin/structure/features/%feature/profiler'] = array(
'title' => 'Profiler',
'description' => 'View this feature in a human friendly way.',
'page callback' => 'drupal_get_form',
'page arguments' => array('features_profiler_form', 3),
'load arguments' => array(3, TRUE),
'type' => MENU_LOCAL_TASK,
'file' => 'features_profiler.pages.inc',
'weight' => 20,
);
foreach ($items as $path => $item) {
if (!isset($item['access callback'])) {
$items[$path]['access callback'] = 'user_access';
$items[$path]['access arguments'] = array('manage features');
}
}
return $items;
}