• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/statustable.php
  • Класс: Bitrix\Crm\StatusTable
  • Вызов: StatusTable::loadStatusesByEntityId
static function loadStatusesByEntityId(string $entityId): array
{
	$result = [];

	$list = static::getList([
		'filter' => [
			'=ENTITY_ID' => $entityId,
		],
		'order' => [
			'SORT' => 'ASC',
			'ID' => 'ASC'
		],
		'cache' => ['ttl' => static::CACHE_TTL],
	]);
	while($status = $list->fetch())
	{
		$result[$status['STATUS_ID']] = $status;
	}

	return $result;
}