GetList
Description and parameters
record set
CTicketDictionary::GetList(
varchar &by,
varchar &order,
array arFilter=array(),
boolean &is_filtered
);
Method is designed for getting list of directory entries. Non-static method.
Method parameters
Parameter | Description |
---|---|
by | Identifier specifying a name for field for sorting. The following values are permitted:
|
order | Sorting order. The following values are permitted:
|
arFilter | Array for filtering values. Array permits the following indexes:
|
is_filtered | Variable returns true in case list of results is filtered by a criteria; or false otherwise. Replaced with isFiltered starting from version 12.0.0. |
Returned value
Returns object CDBResult.
Example
<? $FilterArr = Array( "find_id", "find_lid", "find_type", "find_name", "find_sid", "find_responsible", "find_responsible_id", "find_default" ); if (strlen($set_filter)>0) InitFilterEx($FilterArr,"TICKET_DICTIONARY_LIST","set"); else InitFilterEx($FilterArr,"TICKET_DICTIONARY_LIST","get"); if (strlen($del_filter)>0) DelFilterEx($FilterArr,"TICKET_DICTIONARY_LIST"); $arFilter = Array( "ID" => $find_id, "LID" => $find_lid, "TYPE" => $find_type, "NAME" => $find_name, "SID" => $find_sid, "RESPONSIBLE_ID" => $find_responsible_id, "RESPONSIBLE" => $find_responsible, "DEFAULT" => $find_default ); $tdic = CTicketDictionary::GetList($by, $order, $arFilter, $is_filtered); ?>
//get list of status for current site $arFilter = Array( "LID" => SITE_ID, "TYPE" => "S", ); //sorting is specified via variables $by = "s_c_sort"; $sort = "asc"; //sort and print $rsStatus = CTicketDictionary::GetList($by, $sort, $arFilter, $is_filtered); while($arRes = $rsStatus->GetNext()) { echo $arRes["NAME"], ""; }
© «Bitrix24», 2001-2024