• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Service/Factory.php
  • Класс: Bitrix\Crm\Service\Factory
  • Вызов: Factory::getStages
public function getStages(int $categoryId = null): EO_Status_Collection
{
	if(!isset($this->stageCollections[$categoryId]))
	{
		$filter = [
			'=ENTITY_ID' => $this->getStagesEntityId($categoryId),
		];

		$this->stageCollections[$categoryId] = $this->statusTableClassName::getList([
			'order' => [
				'SORT' => 'ASC',
			],
			'filter' => $filter,
			'cache' => ['ttl' => static::STAGES_CACHE_TTL],
		])->fetchCollection();
		foreach($this->stageCollections[$categoryId] as $stage)
		{
			$this->stages[$stage->getStatusId()] = $stage;
		}
	}

	return $this->stageCollections[$categoryId];
}