浏览代码

OrderShop : getOrderPayments

develop
Guillaume 3 年前
父节点
当前提交
5fd720ef5a
共有 1 个文件被更改,包括 13 次插入1 次删除
  1. +13
    -1
      ShopBundle/Model/OrderShop.php

+ 13
- 1
ShopBundle/Model/OrderShop.php 查看文件

@@ -303,8 +303,20 @@ abstract class OrderShop extends AbstractEntity implements FilterMerchantInterfa
/**
* @return Collection|OrderPayment[]
*/
public function getOrderPayments(): Collection
public function getOrderPayments($meanPayment = null): Collection
{
if($meanPayment) {
$orderPaymentsReturn = new ArrayCollection() ;

foreach($this->orderPayments as $orderPayment) {
if($orderPayment->getMeanPayment() == $meanPayment) {
$orderPaymentsReturn[] = $orderPayment ;
}
}

return $orderPaymentsReturn ;
}

return $this->orderPayments;
}


正在加载...
取消
保存