Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 12 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
31 | 1 | public function getCMSFields() |
|
32 | { |
||
33 | 1 | $this->beforeUpdateCMSFields(function ($fields) { |
|
34 | 1 | $fields->addFieldToTab( |
|
35 | 1 | 'Root.Main', |
|
36 | 1 | LinkField::create('BlockLinkID', 'Link') |
|
37 | 1 | ); |
|
38 | 1 | }); |
|
39 | |||
40 | 1 | $fields = parent::getCMSFields(); |
|
41 | |||
42 | 1 | $fields->removeByName([ |
|
43 | 1 | 'Title', |
|
44 | 1 | ]); |
|
45 | |||
46 | 1 | return $fields; |
|
47 | } |
||
48 | |||
55 | } |
If you implement
__call
and 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
__call
is implemented by a parent class and only the child class knows which methods exist: