Elgg  Version 6.1
TagsSearchFieldsHandler.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Search;
4 
10 
18  public function __invoke(\Elgg\Event $event) {
19 
20  $value = (array) $event->getValue();
21 
22  $defaults = [
23  'metadata' => [],
24  ];
25 
26  $value = array_merge($defaults, $value);
27 
28  $value['metadata'] = array_merge($value['metadata'], ['tags']);
29 
30  return $value;
31  }
32 }
$defaults
Generic entity header upload helper.
Definition: header.php:6
$value
Definition: generic.php:51
__invoke(\Elgg\Event $event)
Populate default search fields for entities.
Models an event passed to event handlers.
Definition: Event.php:11