Elgg
Version master
engine
classes
Elgg
Search
GroupSearchProfileFieldsHandler.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Elgg\Search
;
4
9
class
GroupSearchProfileFieldsHandler
{
10
18
public
function
__invoke
(\
Elgg
\
Event
$event) {
19
$value
= (array) $event->getValue();
20
21
$defaults
= [
22
'metadata'
=> [],
23
];
24
25
$value
= array_merge(
$defaults
,
$value
);
26
27
$profile_fields =
_elgg_services
()->fields->get(
'group'
,
'group'
);
28
foreach
($profile_fields as
$field
) {
29
$value
[
'metadata'
][] =
$field
[
'name'
];
30
}
31
32
return
$value
;
33
}
34
}
Elgg\Event
Models an event passed to event handlers.
Definition:
Event.php:11
Elgg\Search\GroupSearchProfileFieldsHandler
Definition:
GroupSearchProfileFieldsHandler.php:9
Elgg\Search\GroupSearchProfileFieldsHandler\__invoke
__invoke(\Elgg\Event $event)
Search through the group profile fields.
Definition:
GroupSearchProfileFieldsHandler.php:18
$field
if(elgg_extract('input_type', $vars)) if(elgg_extract('required', $vars)) if(elgg_extract('disabled', $vars)) $field
Definition:
field.php:42
_elgg_services
_elgg_services()
Get the global service provider.
Definition:
elgglib.php:353
$defaults
$defaults
Generic entity header upload helper.
Definition:
header.php:6
$value
$value
Definition:
generic.php:51
Elgg\Search
Definition:
GroupSearchFieldsHandler.php:3
Elgg
Definition:
ActionsService.php:3
Generated on Fri Aug 29 2025 00:01:58 for Elgg by
1.9.1