• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/history/leadstatushistoryentry.php
  • Класс: Bitrix\Crm\History\LeadStatusHistoryEntry
  • Вызов: LeadStatusHistoryEntry::getAll
static function getAll($ownerID)
{
	if(!is_int($ownerID))
	{
		$ownerID = (int)$ownerID;
	}

	if($ownerID <= 0)
	{
		throw new Main\ArgumentException('Owner ID must be greater than zero.', 'ownerID');
	}

	$query = new Query(LeadStatusHistoryTable::getEntity());
	$query->addFilter('=OWNER_ID', $ownerID);
	$query->addSelect('*');

	$results = array();
	$dbResult = $query->exec();
	while($fields = $dbResult->fetch())
	{
		$results[] = $fields;
	}
	return $results;
}