GetList
CDBResult CSocNetUserRelations::GetList( array arOrder = array("ID" => "DESC"), array arFilter = array(), array arGroupBy = false, array arNavStartParams = false, array arSelectFields = array() );
The method returns list of bindings between users according to the filter. Static method.
Parameters
Parameter | Description | Available from version |
---|---|---|
arOrder | Sorting order for the returned list, specified as an array. Array keys are the fields for sorting and values - ASC/DESC - sorting order. | |
arFilter | Array, specifying filter for the returned list. Array keys are field names and values are field values. | |
arGroupBy | Array, specifying grouping for the resulting list. When parameter contains an array of field names, which are used to perform grouping. When parameter contains an empty array, the method returns number of records that satisfy the filter. Default parameter is false: do not group. | |
arNavStartParams | Array, specifying conditions of selection for pagewise navigation. | |
arSelectFields | >Array, specifying, specifying selected fields. Contains list of fields to be returned by the method. When array is empty, the following fields are selected: ID, FIRST_USER_ID, SECOND_USER_ID, RELATION, DATE_CREATE, DATE_UPDATE, MESSAGE, INITIATED_BY. Any fields from the list above are permitted in the array. |
List of fields
ID - binding ID,
FIRST_USER_ID - first user ID,
SECOND_USER_ID - second user ID,
RELATION - binding type: SONET_RELATIONS_FRIEND - user are friends, SONET_RELATIONS_REQUEST - one of users has sent a friends request to another user, SONET_RELATIONS_BAN - one of users has blacklisted another user,
DATE_CREATE - date when binding is created,
DATE_UPDATE - date when binding was last updated,
MESSAGE - message from binding initiator,
INITIATED_BY - flag, specifying who initiated the binding: F - first user, S - second user,
FIRST_USER_NAME - first user name,
FIRST_USER_LAST_NAME - first user last name,
FIRST_USER_SECOND_NAME - first user middle name,
FIRST_USER_LOGIN - first user login,
FIRST_USER_EMAIL - first user e-mail,
FIRST_USER_PERSONAL_PHOTO - first user photo ID,
FIRST_USER_LID - first user site,
SECOND_USER_NAME - second user name,
SECOND_USER_LAST_NAME - second user last name,
SECOND_USER_SECOND_NAME - second user middle name,
SECOND_USER_LOGIN - second user login,
SECOND_USER_EMAIL - second user e-mail,
SECOND_USER_PERSONAL_PHOTO - second user photo ID,
SECOND_USER_LID - second user site,
RAND - random number.
Returned value
The method returns CDBResult object, containing records, satisfying the selection condition.