Elgg  Version 3.0
Functions | Variables
search.php File Reference

Go to the source code of this file.

Functions

 elgg_search (array $options=[])
 Basic Elgg search hooks. More...
 
 _elgg_search_init ()
 Initializes default search hooks. More...
 

Variables

return function (\Elgg\EventsService $events,\Elgg\HooksRegistrationService $hooks)
 

Function Documentation

_elgg_search_init ( )

Initializes default search hooks.

Returns
void
Since
3.0

Definition at line 45 of file search.php.

elgg_search ( array  $options = [])

Basic Elgg search hooks.

Returns search results as an array of entities, as a batch, or a count, depending on parameters given.

Parameters
array$optionsSearch parameters Accepts all options supported by elgg_get_entities()

string $query Search query string $type Entity type. Required if no search type is set string $search_type Custom search type. Required if no type is set array $fields An array of fields to search in, supported keys are [ 'attributes' => ['some attribute', 'some other attribute'], 'metadata' => ['some metadata name', 'some other metadata name'], 'annotations' => ['some annotation name', 'some other annotation name'], 'private_settings' => ['some private_setting name', 'some other private_setting name'], ] string $sort An array containing 'property', 'property_type', 'direction' and 'signed' bool $partial_match Allow partial matches, e.g. find 'elgg' when search for 'el' bool $tokenize Break down search query into tokens, e.g. find 'elgg has been released' when searching for 'elgg released'

Returns
ElggBatch|ElggEntity[]|int|false
See also
elgg_get_entities()

Definition at line 32 of file search.php.

Variable Documentation

Definition at line 54 of file search.php.