Documentation

GetList

CDBResult
CSocNetMessages::GetList(
 array arOrder = array("ID" => "DESC"),
 array arFilter = array(),
 array arGroupBy = false,
 array arNavStartParams = false,
 array arSelectFields = array()
);

The method returns list of messages according to filter. Static method.

Parameters

Parameter Description Available from version
arOrder Sorting order, specified as an array for the returned list. Array keys are fields for sorting and values - ASC/DESC - sorting order. Available keys: ID, FROM_USER_ID, TO_USER_ID, DATE_CREATE, DATE_VIEW, MESSAGE_TYPE, FROM_DELETED, TO_DELETED, SEND_MAIL, EMAIL_TEMPLATE, FROM_USER_NAME, FROM_USER_LAST_NAME, FROM_USER_LOGIN, FROM_USER_LID, TO_USER_NAME, TO_USER_LAST_NAME, TO_USER_LOGIN, TO_USER_EMAIL, TO_USER_LID.
arFilter Array, specifying a filter for the returned list. Array keys are field names and values are field values. Available fields: ID, FROM_USER_ID, TO_USER_ID, DATE_CREATE, DATE_VIEW, MESSAGE_TYPE, FROM_DELETED, TO_DELETED, SEND_MAIL, EMAIL_TEMPLATE, FROM_USER_NAME, FROM_USER_LAST_NAME, FROM_USER_LOGIN, FROM_USER_LID, TO_USER_NAME, TO_USER_LAST_NAME, TO_USER_LOGIN, TO_USER_EMAIL, TO_USER_LID.
arGroupBy Array, specifying grouping for resulting list. When parameter contains array of field names, these fields are used to perform the grouping. When parameter contains an empty array, the method returns the number of entries, satisfying the filter. Parameter is set to false by default - do not group.
arNavStartParams Array, specifying parameter selection conditions for pagewise navigation.
arSelectFields Array, specifying selected fields. Contains list of fields to be returned by the method. When an array is empty, the following fields are selected: ID, FROM_USER_ID, TO_USER_ID, MESSAGE, DATE_CREATE, DATE_VIEW, MESSAGE_TYPE, FROM_DELETED, TO_DELETED. Array contains any fields from the list of fields.

List of fields

ID - message ID,
FROM_USER_ID - User/message sender ID,
TO_USER_ID - User/message recipient ID,
MESSAGE - message,
DATE_CREATE - date when message is created,
DATE_VIEW - date when read,
MESSAGE_TYPE - message type: SONET_MESSAGE_SYSTEM - system, SONET_MESSAGE_PRIVATE - user,
FROM_DELETED - flag (Y/N) to delete message by sender,
TO_DELETED - flag (Y/N) to delete message by recipient,
SEND_MAIL - flag (Y/N) to send message by email,
EMAIL_TEMPLATE - email template used to send this message,
FROM_USER_NAME - User/message sender ID,
FROM_USER_LAST_NAME - User/message sender last name,
FROM_USER_LOGIN - User/message sender login,
FROM_USER_PERSONAL_PHOTO - User/message sender photo ID,
FROM_USER_LID - User/message sender site,
TO_USER_NAME - User/message recipient name,
TO_USER_LAST_NAME - User/message recipient last name,
TO_USER_LOGIN - User/message recipient login,
TO_USER_EMAIL - User/message recipient e-mail,
TO_USER_PERSONAL_PHOTO - User/message recipient photo ID,
TO_USER_LID - User/message recipient site.

Returned value

Returns CDBResult object, containing records, satisfying selection condition.

See Also

  • [link=89808]CDBResult[/link]
  • [link=191234]CSocNetMessages::GetById[/link]


© «Bitrix24», 2001-2024