You are here

function hook_search_by_page_settings in Search by Page 8

Add settings to the Search by Page settings screen (sub-module hook).

The returned form array is displayed as a component of the page at URL admin/config/search/search_by_page/%env, and the settings are automatically saved using the form element names and the search_by_page_setting_set() function.

If your module has no settings, you need not implement this hook. If your module has many settings, you can also define your own settings page with path 'admin/config/search/search_by_page/whatever' of type MENU_LOCAL_TASK, to add a tab to the settings page. You can use the function search_by_page_setting_get() to retrieve the setting.

Note that the database of paths is updated after the settings are submitted, so you do not need to do anything special to make this happen if you use this hook. If you use your own settings page, you may want to make use of these three functions: search_by_page_force_reindex() search_by_page_force_remove() search_by_page_rebuild_paths()

Parameters

$environment: ID of environment for settings.

Return value

Form API array that defines one or more fieldsets to add to the Search by Page settings screen at admin/config/search/search_by_page/%env. If you want to use weights for your fieldsets, choose numbers between -98 and -1.

4 functions implement hook_search_by_page_settings()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

search_by_page_attach_search_by_page_settings in search_by_page_attach/search_by_page_attach.module
Implements Search by Page hook_search_by_page_settings().
search_by_page_nodes_search_by_page_settings in search_by_page_nodes/search_by_page_nodes.module
Implements Search by Page hook_search_by_page_settings().
search_by_page_paths_search_by_page_settings in search_by_page_paths/search_by_page_paths.module
Implements Search by Page hook_search_by_page_settings().
search_by_page_users_search_by_page_settings in search_by_page_users/search_by_page_users.module
Implements Search by Page hook_search_by_page_settings().
1 invocation of hook_search_by_page_settings()
search_by_page_admin_settings in ./search_by_page.module
Returns the admin settings page for a single search environment.

File

./search_by_page.api.php, line 201
Search by Page module API.

Code

function hook_search_by_page_settings($environment) {

  // Add your settings form components here.
  return $form = [];
}