49 $md =
new ElggMetadata();
73 $metadata_values = [];
76 $metadata_values[$md->name][] = $md->value;
79 return array_map(
function($values) {
80 return count($values) > 1 ? $values : $values[0];
106 if ($md->name !==
$name) {
110 $values[] = $md->value;
113 if (empty($values)) {
117 return count($values) > 1 ? $values : $values[0];
143 if ($md->name !==
$name) {
154 return count($ids) > 1 ? $ids : $ids[0];
215 if (empty($options[
'guid'])) {
257 return $cached_values;
264 foreach (
$data as $i => $row) {
265 $row->value = ($row->value_type ===
'text') ? $row->value : (
int) $row->value;
266 $values[$row->entity_guid][] = $row;
277 return $cached_values;
295 'callback' =>
function($e) {
296 return (
int) $e->entity_guid;
298 'selects' => [
'SUM(LENGTH(n_table.value)) AS bytes'],
311 return $guids ? : [];
static normalizeGuids(...$args)
Flatten an array of data into an array of GUIDs.
if(!$user||!$user->canDelete()) $name
if(elgg_trigger_plugin_hook('usersettings:save', 'user', $hooks_params, true)) foreach($request->validation() ->all() as $item) $data
$guid
Removes an admin notice.
Extends QueryBuilder with GROUP BY statements.
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Extends QueryBuilder with ORDER BY clauses.
if($container instanceof ElggGroup &&$container->guid!=elgg_get_page_owner_guid()) $key
$guids
Activates all specified installed and inactive plugins.
_elgg_config()
Get the Elgg config service.
_elgg_services()
Get the global service provider.