DealStageHistoryEntry::getAll: Bitrix method

      
<?php 
//  Bitrix\Crm\History\DealStageHistoryEntry :: getAll()
//  /dist/bitrix/modules/crm/lib/history/dealstagehistoryentry.php:16

    
public 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(DealStageHistoryTable::getEntity());
        
$query->addFilter('=OWNER_ID'$ownerID);
        
$query->addSelect('*');

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