You are here

function hook_finderapi in Finder 6

Act on finders.

Parameters

&$object: The finder or finder element.

$op: The operation, indicates where/when this is being invoked. Possible values:

  • "finder_load": The Finder has been loaded from the database, modules can make changes to the Finder here.
  • "finder_presave": The Finder is about to be inserted or updated into the database.
  • "finder_insert": The Finder has been created in the database.
  • "finder_update": The Finder has been changed in the database.
  • "finder_delete": The Finder is being deleted.
  • "finder_admin_edit": An admin is about to load the edit page for the Finder.
  • "finder_admin_delete": An admin is about to load the delete page for the Finder.
  • "finder_element_load": The Finder Element has been loaded from the database, modules can make changes to the Element here.
  • "finder_element_presave": The Finder Element is about to be inserted or updated into the database.
  • "finder_element_insert": The Finder Element has been created in the database.
  • "finder_element_update": The Finder Element has been changed in the database.
  • "finder_element_delete": The Finder Element is being deleted.
  • "finder_admin_element_edit": An admin is about to load the edit page for the Finder Element.
  • "finder_admin_element_delete": An admin is about to load the delete page for the Finder Element.
  • "finder_page": The Finder page is being displayed.
  • "finder_results": The Finder results are being displayed.
  • "finder_block": The Finder block is being displayed.
  • "finder_view": The Finder is being displayed.
  • "finder_find": The Finder is preparing a query.
  • "finder_form": The Finder is preparing a Finder form.
  • "finder_admin_list": The Finder is being listed in the admin table.
  • "finder_export": The Finder is about to be exported.
  • "finder_clone": The Finder is being cloned, such as during an import.

$a3:

  • For "finder_results", passes in the $form_state.
  • For "finder_find", passes in the $mode string which can be 'choices' (for radio/checkbox/select/autocomplete options) or 'results' (for a submitted search).
  • For "finder_form", passes in the $form array.
  • For "finder_admin_edit", "finder_admin_delete", "finder_admin_element_edit", and "finder_admin_element_delete", passes in the $form_state.
  • For "finder_view" passes in the $display param from finder_view().

$a4:

  • For "finder_find", passes in the $finder_element_id useful when $mode is 'choices'.
  • For "finder_form", passes in the $form_state array.
  • For "finder_admin_element_edit" and "finder_admin_element_delete", passes in the $finder.

Return value

The returned value of the invoked hooks:

  • Currently no operations support a return value.
2 functions implement hook_finderapi()

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

finder_i18nstrings_finderapi in modules/finder_i18nstrings/finder_i18nstrings.module
Implementation of hook_finderapi().
finder_invoke_finderapi in ./finder.module
Invoke hook_finderapi().
1 invocation of hook_finderapi()
finder_invoke_finderapi in ./finder.module
Invoke hook_finderapi().

File

./finder.api.php, line 68
Documents finder's hooks for api reference.

Code

function hook_finderapi(&$object, $op, $a3 = NULL, $a4 = NULL) {

  // no example code
}