1 | <?php |
||
2 | class RepeatOrder_OrderItem extends DataObject |
||
3 | { |
||
4 | public static $db = array( |
||
5 | 'Quantity' => 'Int' |
||
6 | ); |
||
7 | public static $has_one = array( |
||
8 | 'Product' => 'Product', |
||
9 | 'Order' => 'RepeatOrder', |
||
10 | 'Alternative1' => 'Product', |
||
11 | 'Alternative2' => 'Product', |
||
12 | 'Alternative3' => 'Product', |
||
13 | 'Alternative4' => 'Product', |
||
14 | 'Alternative5' => 'Product', |
||
15 | 'Alternative6' => 'Product', |
||
16 | 'Alternative7' => 'Product', |
||
17 | 'Alternative8' => 'Product', |
||
18 | 'Alternative9' => 'Product' |
||
19 | ); |
||
20 | |||
21 | public function getCMSFields() |
||
26 | |||
27 | public function Title() |
||
34 | |||
35 | public function BuyableTitle() |
||
42 | |||
43 | /** |
||
44 | * returns a link to the product |
||
45 | * @return string |
||
46 | */ |
||
47 | public function Link() |
||
54 | |||
55 | /** |
||
56 | * returns the product ID |
||
57 | * @return string |
||
58 | */ |
||
59 | public function getProductID() |
||
66 | |||
67 | /** |
||
68 | * @return Field (EcomQuantityField) |
||
69 | **/ |
||
70 | public function IDField() |
||
79 | |||
80 | /** |
||
81 | * @return Field (EcomQuantityField) |
||
82 | **/ |
||
83 | public function QuantityField() |
||
92 | |||
93 | /** |
||
94 | * Alias for AlternativesPerProduct |
||
95 | */ |
||
96 | public function TableAlternatives() |
||
100 | |||
101 | /** |
||
102 | * returns a list of alternatives per product (if any) |
||
103 | * @return ArrayList|null |
||
104 | */ |
||
105 | public function AlternativesPerProduct() |
||
123 | } |
||
124 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@return
annotation as described here.