yellow_menu($may_cache)
yellow/yellow.module, line 41
Implementation of hook_menu
function yellow_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array('path' => 'admin/settings/yellow',
'title' => t('Yellow'),
'access' => user_access('administer yellow'),
'callback' => 'yellow_configure');
$items[] = array('path' => 'yellow',
'title' => t('Yellow'),
'access' => user_access('view yellow'),
'callback' => 'yellow_page');
$items[] = array('path' => 'admin/settings/yellow/configure',
'title' => t('Yellow'),
'access' => user_access('administer yellow'),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
'callback' => 'yellow_configure');
$items[] = array('path' => 'admin/settings/yellow/cache',
'title' => t('Clear the yellow cache'),
'access' => user_access('administer yellow'),
'type' => MENU_LOCAL_TASK,
'callback' => 'yellow_cache');
}
else {
$items[] = array('path' => 'yellow/listing/' . arg(2),
'title' => t('Yellow'),
'type' => MENU_CALLBACK,
'access' => user_access('view yellow'),
'callback' => 'yellow_listing');
$items[] = array('path' => 'yellow/category/' . arg(2),
'title' => t('Yellow'),
'type' => MENU_CALLBACK,
'access' => user_access('view yellow'),
'callback' => 'yellow_category');
}
return $items;
}