PHP Interface Friendable, Elgg

Afficher le fichier Open project: elgg/elgg

Méthodes publiques

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

Method Details

addFriend() public méthode

Adds a user as a friend
public addFriend ( integer $friend_guid ) : boolean
$friend_guid integer The GUID of the user to add
Résultat boolean

getFriends() public méthode

Gets this entity's friends
public getFriends ( array $options = [] ) : array | false
$options array Options array. See elgg_get_entities_from_relationship() for a list of options. 'relationship_guid' is set to this entity, relationship name to 'friend' and type to 'user'.
Résultat array | false Array of \ElggUser, or false, depending on success

getFriendsObjects() public méthode

Get an array of \ElggObjects owned by this entity's friends.
public getFriendsObjects ( array $options = [] ) : array | false
$options array Options array. See elgg_get_entities_from_relationship() 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'.
Résultat array | false

getFriendsOf() public méthode

Gets users who have made this entity a friend
public getFriendsOf ( array $options = [] ) : array | false
$options array Options array. See elgg_get_entities_from_relationship() for a list of options. 'relationship_guid' is set to this entity, relationship name to 'friend', type to 'user' and inverse_relationship to true.
Résultat array | false Array of \ElggUser, or false, depending on success

getObjects() public méthode

Get an array of \ElggObject owned by this entity.
public getObjects ( array $options = [] ) : array | false
$options array Options array. See elgg_get_entities() for a list of options. 'type' is set to object and owner_guid to this entity.
Résultat array | false

isFriend() public méthode

Determines whether or not the current user is a friend of this entity
public isFriend ( ) : boolean
Résultat boolean

isFriendOf() public méthode

Determines whether or not a foreign entity has made this one a friend
public isFriendOf ( integer $user_guid ) : boolean
$user_guid integer The GUID of the foreign entity
Résultat boolean

isFriendsWith() public méthode

Determines whether or not this entity is friends with a particular entity
public isFriendsWith ( integer $user_guid ) : boolean
$user_guid integer The GUID of the entity this entity may or may not be friends with
Résultat boolean

removeFriend() public méthode

Removes a user as a friend
public removeFriend ( integer $friend_guid ) : boolean
$friend_guid integer The GUID of the user to remove
Résultat boolean