Conditions | 5 |
Paths | 5 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | public function getOrders() |
||
19 | { |
||
20 | if ($this->owner->ID) { |
||
21 | $orderVariations = OrderVariation::get()->filter('VariationID', $this->owner->ID); |
||
22 | if ($orderVariations) { |
||
|
|||
23 | $orders = ArrayList::create(); |
||
24 | foreach ($orderVariations as $orderVariation) { |
||
25 | $orderDetail = OrderDetail::get()->byID($orderVariation->OrderDetailID); |
||
26 | $orders->push($orderDetail); |
||
27 | } |
||
28 | } |
||
29 | |||
30 | return isset($orders) ? $orders : false; |
||
31 | } |
||
32 | return false; |
||
33 | } |
||
45 |