GetList
CDBResult CSaleLocationGroup::GetList( array arOrder = Array("NAME"=>"ASC"), array arFilter = Array(), string strLang = LANGUAGE_ID );
The method GetList returns a filtered and sorted list of location groups.
Parameters
Parameter | Description |
---|---|
arOrder | Associated array specifying how the resulting list is to be sorted. Each
pair of keys and values are applied consecutively. The keys are the field
names by which the list is sorted. The corresponding values define the sort
order. The following keys can be used:
|
arFilter | The filter is an associated array whose keys are the group parameter
names, and values are the conditions. The following keys are possible:
|
strLang | The ID of the language in which the language-dependent parameters are to be returned. By default, the current language is used. |
Returned values
Returns an instance of CDBResult, containing associated arrays with the following keys.
Key | Description |
---|---|
ID | The location group ID. |
SORT | Sort weight. |
NAME | Group name. |
LID | Language in which the name is returned. |
Example
<select name="LOCATION2" size="5" multiple> <? $db_vars = CSaleLocationGroup::GetList(Array("NAME"=>"ASC"), array(), LANGUAGE_ID); while ($vars = $db_vars->Fetch()): ?> <option value="<?= $vars["ID"]?>"><?= htmlspecialchars($vars["NAME"])?></option> <? endwhile; ?> </select>
© «Bitrix24», 2001-2024