Метод | Описание | |
---|---|---|
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 |
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'. |
Результат | array | false | Array of \ElggUser, or false, depending on success |
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'. |
Результат | array | false |
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. |
Результат | array | false | Array of \ElggUser, or false, depending on success |
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. |
Результат | array | false |
public isFriendOf ( integer $user_guid ) : boolean | ||
$user_guid | integer | The GUID of the foreign entity |
Результат | boolean |
public isFriendsWith ( integer $user_guid ) : boolean | ||
$user_guid | integer | The GUID of the entity this entity may or may not be friends with |
Результат | boolean |
public removeFriend ( integer $friend_guid ) : boolean | ||
$friend_guid | integer | The GUID of the user to remove |
Результат | boolean |