@@ 41-52 (lines=12) @@ | ||
38 | /** |
|
39 | * @return bool|String |
|
40 | */ |
|
41 | public function getEditLink() |
|
42 | { |
|
43 | if ($this->owner->getListingPage()->hasMethod('Link') && $this->owner->canEdit(Member::currentUser())) { |
|
44 | $field = ($this->owner->config()->get('query_field')) |
|
45 | ? $this->owner->config()->get('query_field') |
|
46 | : 'ID'; |
|
47 | ||
48 | return Controller::join_links($this->owner->getListingPage()->Link('edit'), $this->owner->$field); |
|
49 | } |
|
50 | ||
51 | return false; |
|
52 | } |
|
53 | ||
54 | /** |
|
55 | * @return bool|String |
|
@@ 57-68 (lines=12) @@ | ||
54 | /** |
|
55 | * @return bool|String |
|
56 | */ |
|
57 | public function getDeleteLink() |
|
58 | { |
|
59 | if ($this->owner->getListingPage()->hasMethod('Link') && $this->owner->canDelete(Member::currentUser())) { |
|
60 | $field = ($this->owner->config()->get('query_field')) |
|
61 | ? $this->owner->config()->get('query_field') |
|
62 | : 'ID'; |
|
63 | ||
64 | return Controller::join_links($this->owner->getListingPage()->Link('delete'), $this->owner->$field); |
|
65 | } |
|
66 | ||
67 | return false; |
|
68 | } |
|
69 | ||
70 | } |