44 $md = new \ElggMetadata();
68 $metadata_values = [];
71 $metadata_values[$md->name][] = $md->value;
74 return array_map(
function($values) {
75 return count($values) > 1 ? $values : $values[0];
101 if ($md->name !==
$name) {
105 $values[] = $md->value;
108 if (empty($values)) {
112 return count($values) > 1 ? $values : $values[0];
137 if ($md->name !==
$name) {
148 return count($ids) > 1 ? $ids : $ids[0];
209 if (empty($options[
'guid'])) {
245 return $cached_values;
251 foreach (
$data as $row) {
252 $values[$row->entity_guid][] = $row;
263 return $cached_values;
282 'callback' =>
function($e) {
283 return (
int) $e->entity_guid;
285 'selects' => [
"SUM(LENGTH({$main_alias}.value)) AS bytes"],
static normalizeGuids(...$args)
Flatten an array of data into an array of GUIDs.
Saves user notification settings.
if(!$user||!$user->canDelete()) $name
Extends QueryBuilder with GROUP BY statements.
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
if($who_can_change_language=== 'nobody') elseif($who_can_change_language=== 'admin_only'&&!elgg_is_admin_logged_in()) $options
if(!$entity instanceof\ElggUser) $data
The Elgg cache base class.
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_services()
Get the global service provider.
$guid
Reset an ElggUpgrade.