Elgg  Version 3.0
search.php
Go to the documentation of this file.
1 <?php
32 function elgg_search(array $options = []) {
33  try {
34  return _elgg_services()->search->search($options);
35  } catch (InvalidParameterException $e) {
36  return false;
37  }
38 }
39 
45 function _elgg_search_init() {
49  elgg_register_plugin_hook_handler('search:fields', 'object', \Elgg\Search\TagsSearchFieldsHandler::class);
51  elgg_register_plugin_hook_handler('search:fields', 'user', \Elgg\Search\TagsSearchFieldsHandler::class);
52 }
53 
54 return function (\Elgg\EventsService $events, \Elgg\HooksRegistrationService $hooks) {
55  $events->registerHandler('init', 'system', '_elgg_search_init');
56 };
Events service.
elgg_register_plugin_hook_handler($hook, $type, $callback, $priority=500)
Definition: elgglib.php:634
$options
Elgg admin footer.
Definition: footer.php:6
Configuration exception.
Base class for events and hooks.
elgg_search(array $options=[])
Basic Elgg search hooks.
Definition: search.php:32
_elgg_search_init()
Initializes default search hooks.
Definition: search.php:45
class
Definition: placeholder.php:21
_elgg_services()
Get the global service provider.
Definition: elgglib.php:1292