| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 55 | public function getCMSFields() |
||
| 56 | { |
||
| 57 | $fields = parent::getCMSFields(); |
||
| 58 | |||
| 59 | if ($this->ID) { |
||
| 60 | $fields->addFieldsToTab('Root.Options', array( |
||
| 61 | GridField::create('Options', 'Product Options', $this->Options(), GridFieldConfig_RecordViewer::create()) |
||
|
|
|||
| 62 | )); |
||
| 63 | } |
||
| 64 | |||
| 65 | return $fields; |
||
| 66 | } |
||
| 67 | |||
| 104 |
If you implement
__calland you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__callis implemented by a parent class and only the child class knows which methods exist: