You are here

function finder_ui_menu in Finder 7.2

Implements hook_menu().

File

modules/finder_ui/finder_ui.module, line 12
The Finder UI module.

Code

function finder_ui_menu() {
  $items = array();
  $items['admin/structure/finder/list/%finder/item/%/%ctools_js'] = array(
    'file' => 'item.inc',
    'file path' => drupal_get_path('module', 'finder_ui') . '/includes',
    'title' => 'Edit finder item',
    'page callback' => 'finder_ui_item_page',
    'page arguments' => array(
      4,
      6,
      7,
    ),
    'access arguments' => array(
      'administer finder',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/structure/finder/list/%finder/element/%/%ctools_js'] = array(
    'file' => 'element.inc',
    'file path' => drupal_get_path('module', 'finder_ui') . '/includes',
    'title' => 'Edit finder element',
    'page callback' => 'finder_ui_element_page',
    'page arguments' => array(
      4,
      6,
      7,
    ),
    'access arguments' => array(
      'administer finder',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/structure/finder/list/%finder/delete-element/%/%ctools_js'] = array(
    'file' => 'element.inc',
    'file path' => drupal_get_path('module', 'finder_ui') . '/includes',
    'title' => 'Delete finder element',
    'page callback' => 'finder_ui_element_delete_page',
    'page arguments' => array(
      4,
      6,
      7,
    ),
    'access arguments' => array(
      'administer finder',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/structure/finder/list/%finder/element-item/%/%/%ctools_js'] = array(
    'file' => 'element-item.inc',
    'file path' => drupal_get_path('module', 'finder_ui') . '/includes',
    'title' => 'Edit finder element item',
    'page callback' => 'finder_ui_element_item_page',
    'page arguments' => array(
      4,
      6,
      7,
      8,
    ),
    'access arguments' => array(
      'administer finder',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/structure/finder/list/%finder/field/%/%/%ctools_js'] = array(
    'file' => 'field.inc',
    'file path' => drupal_get_path('module', 'finder_ui') . '/includes',
    'title' => 'Edit finder element field',
    'page callback' => 'finder_ui_field_page',
    'page arguments' => array(
      4,
      6,
      7,
      8,
    ),
    'access arguments' => array(
      'administer finder',
    ),
    'type' => MENU_CALLBACK,
  );
  $finders = finder_load_all(TRUE);
  if (!empty($finders)) {
    foreach ($finders as $finder) {
      $items[$finder->path . '/finder-ui'] = array(
        'title' => 'Edit',
        'page callback' => 'drupal_goto',
        'page arguments' => array(
          'admin/structure/finder/list/' . $finder->name . '/edit',
        ),
        'access arguments' => array(
          'administer finder',
        ),
        'type' => MENU_LOCAL_ACTION,
      );
    }
  }
  return $items;
}