Elgg  Version 4.3
Functions
relationships.php File Reference

Go to the source code of this file.

Functions

 elgg_get_relationship (int $id)
 Get a relationship by its ID. More...
 
 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. More...
 
 elgg_list_entities_from_relationship_count ($options)
 Returns a list of entities by relationship count. More...
 
 elgg_get_relationships (array $options=[])
 Fetch relationships or perform a calculation on them. More...
 
 elgg_list_relationships ($options)
 Returns a rendered list of relationships with pagination. More...
 

Function Documentation

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.

This is a good way to get out the users with the most friends, or the groups with the most members.

Parameters
array$optionsAn options array compatible with elgg_get_entities_from_relationship()
Returns
[]|int|boolean If count, int. If not count, array. false on errors.
Since
1.8.0

Definition at line 30 of file relationships.php.

elgg_get_relationship ( int  $id)

Get a relationship by its ID.

Parameters
int$idThe relationship ID
Returns
|null
Since
4.3

Definition at line 16 of file relationships.php.

elgg_get_relationships ( array  $options = [])

Fetch relationships or perform a calculation on them.

Accepts all options supported by elgg_get_entities()

The default 'order_by' is 'er.time_created, er.id' DESC

Parameters
array$optionsOptions
Returns
[]|mixed
See also
elgg_get_entities()
Since
3.2.0

Definition at line 62 of file relationships.php.

elgg_list_entities_from_relationship_count (   $options)

Returns a list of entities by relationship count.

See also
elgg_get_entities_from_relationship_count()
Parameters
array$optionsOptions array
Returns
string
Since
1.8.0

Definition at line 44 of file relationships.php.

elgg_list_relationships (   $options)

Returns a rendered list of relationships with pagination.

Parameters
array$optionsRelationship getter and display options. elgg_get_relationships() and elgg_list_entities().
Returns
string The list of relationships
Since
3.2.0

Definition at line 75 of file relationships.php.