Documentation

GetList

CUserTypeEntity::GetList
 (
   Sort=array(),
   Filter=array()
 )

The method returns the list of user fields by the filter $arFilter with sorting $arOrder. Static method.

Parameters

Parameter Description
arOrderArray of field for sorting, containing the pairs sorting field => sorting direction. Sorting fields:
  • ID - user field ID
  • ENTITY_ID - name of object to which the user field belongs.
  • FIELD_NAME - field name;
  • USER_TYPE_ID
  • XML_ID
  • SORT - sorting value;
Sorting direction:
  • ASC - by ascension;
  • DESC - by descension.
arFilter Array type array("filtered field" => "value" [, ...]). Can have the following values:
  • ID - user field ID;
  • ENTITY_ID - name of object, to which the user field belongs to.
    For example: "ENTITY_ID" => "IBLOCK_".$iblock_id."_SECTION";
  • FIELD_NAME - Field name;
  • SORT - Sorting value;
  • USER_TYPE_ID
  • XML_ID
  • MULTIPLE - multiplicity value;
  • MANDATORY
  • SHOW_FILTER
  • SHOW_IN_LIST
  • EDIT_IN_LIST
  • IS_SEARCHABLE
  • LANG - language ID

    Attention! If the LANG key is not specified in the filter with the required language value ('LANG' => 'en'), the fields "Edit form signature", "Header in List" and etc. will not be included in the selection. ([EDIT_FORM_LABEL], [LIST_COLUMN_LABEL], [LIST_FILTER_LABEL], [ERROR_MESSAGE], [HELP_MESSAGE])

Optional parameter. Records are not filtered by default.

Returned value

Returns CDBResult class value.

Examples of use

<?
$rsData = CUserTypeEntity::GetList( array($by=>$order), array() );
while($arRes = $rsData->Fetch())
{
echo $arRes["FIELD_NAME"]."
"; // print the name of user field echo "<pre>"; print_r($arRes); echo "</pre>"; // print the array of values ?>


© «Bitrix24», 2001-2022
Up