public calculateTotalQuantity ( ) : integer | ||
Результат | integer |
public function calculateTotalQuantity()
{
$totalQuantity = 0;
foreach ($this->getOrderDetails() as $OrderDetail) {
$totalQuantity += $OrderDetail->getQuantity();
}
return $totalQuantity;
}
/** * 合計数量を取得 * * @param Order $Order * @return int * @deprecated since 3.0.0, to be removed in 3.1 */ public function getTotalQuantity(Order $Order) { return $Order->calculateTotalQuantity(); }