Dashboard > Maintain > Maintain Documentation > Maintain Module Search Functions
Maintain Log In   View a printable version of the current page.
Maintain Module Search Functions
Added by Michael Clay, last edited by Frederic Wenzel on Sep 01, 2006  (view change)
Labels: 
(None)

The following abstract functions from the Module class, if overridden in a module, enable it to implement search functionality along with the main Maintain search function.

Maintain Module Search Functions

Overview

All functions for the search part of the module will be prepended with the word search in order to make it abundantly clear what part of module functionality they reference.

The functions

  • searchGetObjects() - This function will return an associative array of String mappings (module-internal object names to human-readable ones) that the module will support search for. To help prevent one module from calling another's search routine due to modules having the same objects available, the objects will be automatically prepended with the module name they came from so that when they are submitted the appropriate module will be called to perform search and a nl:GetFields call. It will return false otherwise.
    • Example: array('ip' => 'IP Address')
  • searchGetFields(objName) - This function will return an associative array of fields (internal field name => human-readable field name) that are searchable from the search form. It will return false otherwise.
    • Example: see searchGetObjects(.)
  • searchGetAcceptableTypes(objName) - This function will return an array of acceptable search types for the given object name. (Example: Exact, Fuzzy, Regex, etc)
  • search(string, obj, field, type) This function will return an array of UIDs for a given Object (obj) that match a the search string (string) on a field (field) based on the type of search (type). It will return false if not implemented)
  • searchDisplayColumns() - This function will return an array of the form Display=>backend. it will be used to form a DataList and as a result will need both of those pieces of information. This will determine what columns are to be displayed for the objects that matched the search criteria. This method will return false otherwise.
  • searchFetch(Obj, UID, field) - This function will fetch a particular object's (obj), specified by UID, field. This will be used to populate rows in the DataList. This function will return false otherwise.

Notice

This information is not considered stable yet and might be subject to change.

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.7 Build:#524 Jul 28, 2006) - Bug/feature request - Contact Administrators