You are here

function search_by_page_paths_menu in Search by Page 8

Implements hook_menu().

Defines a tab on Search by Page environment edit that lists the paths to be indexed, with ability to add, edit, and delete them.

File

search_by_page_paths/search_by_page_paths.module, line 191
Module file for Search by Page Paths, a sub-module for Search by Page.

Code

function search_by_page_paths_menu() {
  $items = array();
  $items['admin/config/search/search_by_page/edit/%/paths'] = array(
    'title' => 'Paths',
    'type' => MENU_LOCAL_TASK,
    'weight' => 0,
    'page callback' => '_search_by_page_paths_list_page',
    'page arguments' => array(
      5,
    ),
    'access arguments' => array(
      'administer search by page',
    ),
  );
  $items['admin/config/search/search_by_page/edit/%/paths/edit'] = array(
    'title' => 'Edit path',
    'type' => MENU_CALLBACK,
    'page callback' => '_search_by_page_paths_edit',
    'page arguments' => array(
      5,
    ),
    'access arguments' => array(
      'administer search by page',
    ),
  );
  $items['admin/config/search/search_by_page/edit/%/paths/add'] = array(
    'title' => 'Add path',
    'type' => MENU_CALLBACK,
    'page callback' => '_search_by_page_paths_edit',
    'page arguments' => array(
      5,
    ),
    'access arguments' => array(
      'administer search by page',
    ),
  );
  $items['admin/config/search/search_by_page/edit/%/paths/delete'] = array(
    'title' => 'Delete path',
    'type' => MENU_CALLBACK,
    //'page callback' => 'drupal_get_form',
    'page callback' => '$form = \\Drupal::formBuilder()->getForm();',
    'page arguments' => array(
      'search_by_page_paths_delete_confirm',
      5,
    ),
    'access arguments' => array(
      'administer search by page',
    ),
  );
  return $items;
}