Total Complexity | 13 |
Total Lines | 62 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
14 | class ManageableObjectDataExtension extends DataExtension |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * Get the listing page to view this Event on (used in Link functions below) |
||
19 | * |
||
20 | * @return mixed |
||
21 | */ |
||
22 | public function getListingPage() |
||
32 | } |
||
33 | |||
34 | /** |
||
35 | * @return bool |
||
36 | */ |
||
37 | public function getAddLink() |
||
38 | { |
||
39 | if ($this->owner->getListingPage()->hasMethod('Link') && $this->owner->canCreate(Security::getCurrentUser())) { |
||
40 | return $this->owner->getListingPage()->Link('add'); |
||
41 | } |
||
42 | |||
43 | return false; |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * @return bool|String |
||
48 | */ |
||
49 | public function getEditLink() |
||
50 | { |
||
51 | if ($this->owner->getListingPage()->hasMethod('Link') && $this->owner->canEdit(Security::getCurrentUser())) { |
||
52 | $field = ($this->owner->config()->get('query_field')) |
||
53 | ? $this->owner->config()->get('query_field') |
||
54 | : 'ID'; |
||
55 | |||
56 | return Controller::join_links($this->owner->getListingPage()->Link('edit'), $this->owner->$field); |
||
57 | } |
||
58 | |||
59 | return false; |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * @return bool|String |
||
64 | */ |
||
65 | public function getDeleteLink() |
||
76 | } |
||
77 | |||
78 | } |
||
79 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.