Bitrix Site Manager

CSaleAuxiliary::GetList

CDBResult
CSaleAuxiliary::GetList(
 array arOrder = array(),
 array arFilter = array(),
 array arGroupBy = false,
 array arNavStartParams = false,
 array arSelectFields = array()
);

The method GetList returns a list of records containing information about temporary access.

Parameters

ParameterDescription
arOrder Associated array used to sort the resulting records. The array has the following format:
array(
"field_name1" => "sort_order1",
"field_name2" => "sort_order2",
. . .
)
The fields field_nameN can be any information field of the temporary access. The sort_orderX can be either "ASC" (ascending) or "DESC" (descending). 

If the sorting array has more than one elements, the resulting list is sorted by each element in series (i.e. the list is first sorted by the first element, then the result is sorted by the second element etc). 

The default value is an empty array() which means that the result will not be sorted.
arFilter Associated array used to filter the returned records. The array has the following format:
array(
"[modifier1][operator1]field_name1" => "value1",
"[modifier2][operator2]field_name2" => "value2",
. . .
)
Records satisfying the filter conditions are returned as a result, others are truncated.

The following modifiers are possible:
  • ! - negation;
  • + - values null, 0 and empty string also satisfy the filter conditions.
The following operators are possible:
  • >= - the field value is more than or equal to that passed in the filter;
  • > - the field value is more than that passed in the filter;
  • <= - the field value is less than or equal to that passed in the filter;
  • < - the field value is less than that passed in the filter;
  • @ - the field value is stored in the list of comma separated values passed in the filter;
  • ~ - the field value is matched against the wildcard passed to the filter;
  • % - the field value is matched (according to the query language) against the string passed to the filter.
The fields field_nameX can be any field containing information about the temporary access.

Example:
array("USER_ID" => 150)
This filter tells to "return all records with the value 150 in the USER_ID field".

The default value is an empty array() which means that the result will not be filtered.
arGroupBy Associated array used to group the records. The array has the following format:
array("field_name1",
      "grouping_function2" => "field_name2", . . .)
The fields field_nameN can be any field containing information about the temporary access. The grouping_functionX can be one of the following:
  • COUNT - quantity counting;
  • AVG - calculation of the average value;
  • MIN - calculation of the minimum value;
  • MAX - calculation of the maximum value;
  • SUM - calculation of the total value.
If the array is empty, the method will return the number of records satisfying the filter.

The default value is false which means that the result will not be grouped.
arNavStartParams Array of the selection parameters. The following keys are possible in this array:
  • "nTopCount" - number of records returned by the method will be limited to the value of this key;
  • any key that can be passed to CDBResult::NavQuery in the third parameter.
The default value is false which means that no parameter is given.
arSelectFields Array of record fields that will be returned by the method. You may specify the required fields only. If the array contains the value of "*", all available fields will be returned.

The default value is an empty array() which means that all the fields of the main query table will be returned.

Return Values

The method returns a CDBResult class instance, containing the list of associated arrays of the temporary access parameters with the following keys:

If an empty array is passed as an arGroupBy parameter, the method will return the number of records satisfying the filter.