Elgg  Version 3.0
metadata.php
Go to the documentation of this file.
1 <?php
20  return _elgg_services()->metadataTable->get($id);
21 }
22 
31  if (!$metadata) {
32  return false;
33  }
34  return $metadata->delete();
35 }
36 
49 function elgg_get_metadata(array $options = []) {
50  return _elgg_services()->metadataTable->getAll($options);
51 }
52 
64 function elgg_delete_metadata(array $options) {
65  return _elgg_services()->metadataTable->deleteAll($options);
66 }
67 
71 return function(\Elgg\EventsService $events, \Elgg\HooksRegistrationService $hooks) {
72  $hooks->registerHandler('unit_test', 'system', '_elgg_metadata_test');
73 };
elgg_delete_metadata_by_id($id)
Deletes metadata using its ID.
Definition: metadata.php:29
Events service.
elgg_get_metadata_from_id($id)
Get a specific metadata object by its id.
Definition: metadata.php:19
$options
Elgg admin footer.
Definition: footer.php:6
$metadata
Outputs object metadata $vars[&#39;metadata&#39;] Metadata/menu $vars[&#39;show_entity_menu&#39;] Show the entity m...
Definition: metadata.php:10
$id
River item delete action.
Definition: delete.php:6
Base class for events and hooks.
elgg_get_metadata(array $options=[])
Fetch metadata or perform a calculation on them.
Definition: metadata.php:49
elgg_delete_metadata(array $options)
Deletes metadata based on $options.
Definition: metadata.php:64
_elgg_services()
Get the global service provider.
Definition: elgglib.php:1292