Hook: beforeSearch

Bevor eine Suche ausgeführt wird

/*
 * -- Registration: --
 * $GLOBALS['MERCONIS_HOOKS']['beforeSearch'][] = array('myMerconisHookClass', 'myBeforeSearch');
 *
 * -- Invocation: --
 * Before a search is performed.
 *
 * -- Parameters: --
 *	1. $arrSearchCriteria - an array containing the search criteria
 *
 * -- Return value: --
 * $arrSearchCriteria
 *
 * -- Objective: --
 * e.g. manipulation of the search criteria
 *  
 */

public function myBeforeSearch($arrSearchCriteria) {

	/*
	 * Example: Extend the search term if it contains a specific word
	 */
	
	if (strstr($arrSearchCriteria['fulltext'], 'aperiam')) {
		$arrSearchCriteria['fulltext'] .= ' gubergren';
	}
	
	return $arrSearchCriteria;
}