| Conditions | 4 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 39 | public function getOrders() |
||
| 40 | { |
||
| 41 | if ($this->owner->ID) { |
||
| 42 | $orderVariations = OrderVariation::get()->filter('VariationID', $this->owner->ID); |
||
| 43 | if ($orderVariations) { |
||
|
|
|||
| 44 | $orders = ArrayList::create(); |
||
| 45 | foreach ($orderVariations as $orderVariation) { |
||
| 46 | $orderDetail = OrderDetail::get()->byID($orderVariation->OrderDetailID); |
||
| 47 | $orders->push($orderDetail); |
||
| 48 | } |
||
| 49 | } |
||
| 50 | |||
| 51 | return $orders; |
||
| 52 | |||
| 53 | } |
||
| 54 | return false; |
||
| 55 | } |
||
| 57 |