| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 57 | public function getCMSFields() |
||
| 58 | { |
||
| 59 | $this->beforeUpdateCMSFields(function (FieldList $fields) { |
||
| 60 | $fields->removeByName([ |
||
| 61 | 'DiscountID', |
||
| 62 | ]); |
||
| 63 | |||
| 64 | $quantity = $fields->dataFieldByName('Quantity'); |
||
| 65 | $quantity->setTitle('Quantity to trigger discount'); |
||
| 66 | |||
| 67 | $percentage = $fields->dataFieldByName('Percentage'); |
||
| 68 | $percentage->setTitle('Percent discount'); |
||
| 69 | }); |
||
| 70 | |||
| 71 | return parent::getCMSFields(); |
||
| 72 | } |
||
| 82 |