You are here

function asset_search_menu in Asset 6

Same name and namespace in other branches
  1. 5.2 contrib/asset_search/asset_search.module \asset_search_menu()

Implementation of hook_menu().

File

contrib/asset_search/asset_search.module, line 6

Code

function asset_search_menu($may_cache) {
  $items = array();
  if (!$may_cache) {
    if (arg(0) == 'asset' && arg(1) == 'wizard') {
      foreach (asset_search_types() as $key => $type) {
        $items[] = array(
          'path' => 'asset/wizard/method/search/' . $key,
          'title' => t('Asset Wizard - Search Results'),
          'type' => MENU_CALLBACK,
          'access' => user_access('access asset wizard'),
          'callback' => 'asset_search_wizard_results',
          'callback arguments' => array(
            $key,
            arg(5),
          ),
        );
      }
      if (arg(2) == 'search_preview' && arg(3)) {
        $items[] = array(
          'path' => 'asset/wizard/search_preview/' . arg(3),
          'type' => MENU_CALLBACK,
          'title' => t('Asset Wizard - Search Results'),
          'access' => user_access('access asset wizard'),
          'callback' => 'asset_search_wizard_preview',
          'callback arguments' => array(
            arg(3),
          ),
        );
      }
    }
  }
  return $items;
}