LeadChannelStatisticEntry::getAll

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. LeadChannelStatisticEntry
  4. getAll
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/statistics/leadchannelstatisticentry.php
  • Класс: Bitrix\Crm\Statistics\LeadChannelStatisticEntry
  • Вызов: LeadChannelStatisticEntry::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(LeadChannelStatisticsTable::getEntity());
	$query->addSelect('*');
	$query->addFilter('=OWNER_ID', $ownerID);
	$query->addOrder('CREATED_DATE', 'ASC');

	$dbResult = $query->exec();
	$results = array();

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

Добавить комментарий