function finder_menu in Finder 7.2
Same name and namespace in other branches
- 6 finder.module \finder_menu()
- 7 finder.module \finder_menu()
Implements hook_menu().
File
- ./
finder.module, line 14 - The finder module.
Code
function finder_menu() {
$items = array();
/*
// I don't think this is needed.
$items['finder_ajax/%finder/%'] = array(
'title' => 'Finder Ajax',
'page callback' => 'finder_ajax',
'page arguments' => array(1, 2),
'access arguments' => array('use finder'),
'type' => MENU_CALLBACK,
);
*/
$items['finder_element_ajax/%finder/%'] = array(
'title' => 'Finder Element Ajax',
'page callback' => 'finder_element_ajax',
'page arguments' => array(
1,
2,
),
'access arguments' => array(
'use finder',
),
'type' => MENU_CALLBACK,
);
$items['finder_results_ajax/%finder'] = array(
'title' => 'Finder Results Ajax',
'page callback' => 'finder_results_ajax',
'page arguments' => array(
1,
),
'access arguments' => array(
'use finder',
),
'type' => MENU_CALLBACK,
);
$finders = finder_load_all(TRUE);
if (is_array($finders)) {
foreach ($finders as $finder) {
$items[$finder->path] = array(
'title' => $finder->title,
'page callback' => 'finder_page',
'page arguments' => array(
$finder->name,
),
'access arguments' => array(
'use finder',
),
'type' => MENU_CALLBACK,
'description' => $finder->description,
);
}
}
finder_plugin_hooks('menu', $items);
return $items;
}