src/ShopPaymentTransactionBundle/objects/TPkgShopPaymentTransactionDataEndPoint.class.php
public function getTotalValueForItemType($sType)
    {
        $dTotal = 0;
        reset($this->items);
        /** @var TPkgShopPaymentTransactionItemData $oItem */
        foreach ($this->items as $oItem) {
            if ($sType !== $oItem->getType()) {
                continue;
            }
            $dTotal = $dTotal + ($oItem->getAmount() * $oItem->getValue());
        }

        return $dTotal;
    }
public function getTotalValueForItemType($sType)
    {
        $dTotal = 0;
        reset($this->items);
        /** @var TPkgShopPaymentTransactionItemData $oItem */
        foreach ($this->items as $oItem) {
            if ($sType !== $oItem->getType()) {
                continue;
            }
            $dTotal = $dTotal + ($oItem->getAmount() * $oItem->getValue());
        }

        return $dTotal;
    }
public function getTotalValueForItemType ( $ sType ) { $ dTotal = 0 ; reset ( $ this -> items ) ; /** @var TPkgShopPaymentTransactionItemData $oItem */ foreach ( $ this -> items as $ oItem ) { if ( $ sType !== $ oItem -> getType ( ) ) { continue ; } $ dTotal = $ dTotal + ( $ oItem -> getAmount ( ) * $ oItem -> getValue ( ) ) ; } return $ dTotal ; }
return the total value of all items with the given item type.

@param $sType - must be one of TPkgShopPaymentTransactionItemData::TYPE_*

@return int
return the total value of all items with the given item type .