Elgg  Version 3.0
Public Member Functions | List of all members
Friendable Interface Reference
Inheritance diagram for Friendable:
ElggUser

Public Member Functions

 addFriend ($friend_guid)
 Adds a user as a friend. More...
 
 removeFriend ($friend_guid)
 Removes a user as a friend. More...
 
 isFriend ()
 Determines whether or not the current user is a friend of this entity. More...
 
 isFriendsWith ($user_guid)
 Determines whether or not this entity is friends with a particular entity. More...
 
 isFriendOf ($user_guid)
 Determines whether or not a foreign entity has made this one a friend. More...
 
 getFriends (array $options=[])
 Gets this entity's friends. More...
 
 getFriendsOf (array $options=[])
 Gets users who have made this entity a friend. More...
 
 getObjects (array $options=[])
 Get an array of owned by this entity. More...
 
 getFriendsObjects (array $options=[])
 Get an array of owned by this entity's friends. More...
 

Detailed Description

Definition at line 8 of file Friendable.php.

Member Function Documentation

Friendable::addFriend (   $friend_guid)

Adds a user as a friend.

Parameters
int$friend_guidThe GUID of the user to add
Returns
bool
Friendable::getFriends ( array  $options = [])

Gets this entity's friends.

Parameters
array$optionsOptions array. See elgg_get_entities() for a list of options. 'relationship_guid' is set to this entity, relationship name to 'friend' and type to 'user'.
Returns
[]|int|mixed

Implemented in ElggUser.

Friendable::getFriendsObjects ( array  $options = [])

Get an array of owned by this entity's friends.

Parameters
array$optionsOptions array. See elgg_get_entities() for a list of options. 'relationship_guid' is set to this entity, type to 'object', relationship name to 'friend' and relationship_join_on to 'container_guid'.
Returns
[]|int|mixed

Implemented in ElggUser.

Friendable::getFriendsOf ( array  $options = [])

Gets users who have made this entity a friend.

Parameters
array$optionsOptions array. See elgg_get_entities() for a list of options. 'relationship_guid' is set to this entity, relationship name to 'friend', type to 'user' and inverse_relationship to true.
Returns
[]|int|mixed

Implemented in ElggUser.

Friendable::getObjects ( array  $options = [])

Get an array of owned by this entity.

Parameters
array$optionsOptions array. See elgg_get_entities() for a list of options. 'type' is set to object and owner_guid to this entity.
Returns
[]|int|mixed

Implemented in ElggUser.

Friendable::isFriend ( )

Determines whether or not the current user is a friend of this entity.

Returns
bool

Implemented in ElggUser.

Friendable::isFriendOf (   $user_guid)

Determines whether or not a foreign entity has made this one a friend.

Parameters
int$user_guidThe GUID of the foreign entity
Returns
bool

Implemented in ElggUser.

Friendable::isFriendsWith (   $user_guid)

Determines whether or not this entity is friends with a particular entity.

Parameters
int$user_guidThe GUID of the entity this entity may or may not be friends with
Returns
bool

Implemented in ElggUser.

Friendable::removeFriend (   $friend_guid)

Removes a user as a friend.

Parameters
int$friend_guidThe GUID of the user to remove
Returns
bool

Implemented in ElggUser.


The documentation for this interface was generated from the following file: