Elgg  Version 4.3
relationships.php
Go to the documentation of this file.
1 <?php
7 
17  return _elgg_services()->relationshipsTable->get($id);
18 }
19 
31  return _elgg_services()->relationshipsTable->getEntitiesFromCount($options);
32 }
33 
45  return elgg_list_entities($options, 'elgg_get_entities_from_relationship_count');
46 }
47 
62 function elgg_get_relationships(array $options = []) {
63  return Relationships::find($options);
64 }
65 
76  $defaults = [
77  'limit' => (int) max(get_input('limit', max(25, _elgg_services()->config->default_limit)), 0),
78  'offset' => (int) max(get_input('reloff', 0), 0),
79  'sort_by' => get_input('sort_by', []),
80  ];
81 
82  $options = array_merge($defaults, $options);
83 
84  return elgg_list_entities($options, 'elgg_get_relationships', 'elgg_view_relationship_list');
85 }
$defaults
elgg_list_entities_from_relationship_count($options)
Returns a list of entities by relationship count.
elgg_get_entities_from_relationship_count(array $options=[])
Gets the number of entities by a the number of entities related to them in a particular way...
elgg_list_entities(array $options=[], $getter= 'elgg_get_entities', $viewer= 'elgg_view_entity_list')
Returns a string of rendered entities.
Definition: entities.php:589
$options
Elgg admin footer.
Definition: footer.php:6
elgg_get_relationship(int $id)
Get a relationship by its ID.
get_input($variable, $default=null, $filter_result=true)
Parameter input functions.
Definition: input.php:20
elgg_get_relationships(array $options=[])
Fetch relationships or perform a calculation on them.
_elgg_services()
Get the global service provider.
Definition: elgglib.php:638
elgg_list_relationships($options)
Returns a rendered list of relationships with pagination.
$id
Generic annotation delete action.
Definition: delete.php:6
Elgg relationships.