Documentation

GetList

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

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

Parameters

Parameter Description Available from version
arOrder Sorting order for returned list, defined as an array. Array keys are fields for sorting; values - ASC/DESC - sorting order. Available keys: ID, SITE_ID, NAME, DATE_CREATE, DATE_UPDATE, DATE_ACTIVITY, ACTIVE, VISIBLE, OPENED, CLOSED, SUBJECT_ID, OWNER_ID, NUMBER_OF_MEMBERS, INITIATE_PERMS, SPAM_PERMS, SUBJECT_NAME, OWNER_NAME, OWNER_LAST_NAME, OWNER_LOGIN.
arFilter Array, specifying the filter for returned list. Array keys are field names, values - field values. Available fields:ID, SITE_ID, NAME, DATE_CREATE, DATE_UPDATE, DATE_ACTIVITY, ACTIVE, VISIBLE, OPENED, CLOSED, SUBJECT_ID, OWNER_ID, NUMBER_OF_MEMBERS, INITIATE_PERMS, SPAM_PERMS, SUBJECT_NAME, OWNER_NAME, OWNER_LAST_NAME, OWNER_LOGIN, CHECK_PERMISSIONS.
arGroupBy Array, specifying the grouping of resulting list. If this parameter contains array of field names, sorting will be performed by these fields. When this parameter contains an empty array, the method returns the number of records, satisfying the filter. Default parameter value is false, meaning that grouping is disabled.
arNavStartParams Array, specifying parameter conditions to organize page wise navigation.
arSelectFields Array that specifies returned fields. Contains list of fields to be returned by the method. When the array is empty, the following fields are returned: ID, SITE_ID, NAME, DESCRIPTION, DATE_CREATE, DATE_UPDATE, DATE_ACTIVITY, ACTIVE, VISIBLE, OPENED, CLOSED, SUBJECT_ID, OWNER_ID, KEYWORDS, IMAGE_ID, NUMBER_OF_MEMBERS, INITIATE_PERMS, SPAM_PERMS, SUBJECT_NAME. Any fields from the field list are available in the array.

This method supports the use of the custom user fields jointly with the rest of other fields in the arOrder, arFilter and arSelectFields parameters. Additionally, the "UF_*" value can be used in arSelectFields to return values of all workgroup user fields.

List of fields

ID - workgroup ID,
SITE_ID - site ID,
NAME - group name,
DESCRIPTION - group description,
DATE_CREATE - date when created,
DATE_UPDATE - date of the last update of workgroup parameters,
ACTIVE - active status,
VISIBLE - group visibility in lists,
OPENED - defines if the group is open for users to join freely,
CLOSED - archive group status,
SUBJECT_ID - group topic ID,
OWNER_ID - group owner ID,
KEYWORDS - keywords,
IMAGE_ID - icon ID,
NUMBER_OF_MEMBERS - number of group members,
INITIATE_PERMS - who has permissions to accept new members into a group,
SPAM_PERMS - who has permissions messages to group members,
DATE_ACTIVITY - date of the last activity in group,
SUBJECT_NAME - group topic name.

OWNER_NAME - group owner name,
OWNER_LAST_NAME - group owner last name,
OWNER_LOGIN - group owner login,
CHECK_PERMISSIONS - user ID, who's access permissions must be checked when returning workgroups. In a specific case, it can be the current user. Without access permission check, all groups are returned.

Returned value

The method returns CDBResult object type, containing records that satisfy the returned parameter conditions.

See Also



© «Bitrix24», 2001-2024
Up