Метод getList
Сигнатура метода
public function getList(ItemSelect|array $select, ?ItemFilter $filter = null, ?ItemSort $sort = null, ?PagerInterface $pager = null): ItemCollection
Возвращает:
ItemCollection
Описание
Reads a list of Items. Example — open deals in stage NEW with `opportunity >= 100`, sorted, paginated, with `productRows` eagerly loaded: ```php use Bitrix\Crm\V2\Public\Provider\Item\DealProvider; use Bitrix\Crm\V2\Public\Provider\Item\Param\{ItemFilter, ItemSelect, ItemSort}; use Bitrix\Main\Provider\Params\Pager; $deals = (new DealProvider())->getList( (new ItemSelect('title', 'opportunity'))->withProductRows(), new ItemFilter([ 'stageId' => 'NEW', '>=opportunity' => 100, '@assignedById' => [1, 2, 3], ]), new ItemSort(['createdTime' => 'DESC']), new Pager(limit: 25), ); ``` `$select` is required; pass {@see ItemSelect::all()} to read every scalar (avoid it for performance). A plain camelCase `string[]` is accepted as a shorthand. Without a `$pager` the result is unbounded.
Параметры
4| Имя | Тип | По умолчанию | Флаги |
|---|---|---|---|
$select
|
ItemSelect|array
|
—
|
—
|
$filter
|
?ItemFilter
|
null
|
—
|
$sort
|
?ItemSort
|
null
|
—
|
$pager
|
?PagerInterface
|
null
|
—
|
Расположение
Исходный файл метода в Bitrix Framework
~/bitrix/modulescrm/lib/V2/Public/Provider/Item/AbstractItemProvider.php