1 | <?php |
||
8 | class Users_Account_Controller extends Controller implements PermissionProvider |
||
|
|||
9 | { |
||
10 | |||
11 | /** |
||
12 | * URL That you can access this from |
||
13 | * |
||
14 | * @config |
||
15 | */ |
||
16 | private static $url_segment = "users/account"; |
||
17 | |||
18 | /** |
||
19 | * Allowed sub-URL's on this controller |
||
20 | * |
||
21 | * @var array |
||
22 | * @config |
||
23 | */ |
||
24 | private static $allowed_actions = array( |
||
25 | "edit", |
||
26 | "changepassword", |
||
27 | "EditAccountForm", |
||
28 | "ChangePasswordForm", |
||
29 | ); |
||
30 | |||
31 | /** |
||
32 | * User account associated with this controller |
||
33 | * |
||
34 | * @var Member |
||
35 | */ |
||
36 | protected $member; |
||
37 | |||
38 | /** |
||
39 | * Getter for member |
||
40 | * |
||
41 | * @return Member |
||
42 | */ |
||
43 | public function getMember() |
||
47 | |||
48 | /** |
||
49 | * Setter for member |
||
50 | * |
||
51 | * @param Member $member |
||
52 | * @return self |
||
53 | */ |
||
54 | public function setMember(Member $member) |
||
59 | |||
60 | /** |
||
61 | * Determine if current user requires verification (based on their |
||
62 | * account and Users verification setting). |
||
63 | * |
||
64 | * @return boolean |
||
65 | */ |
||
66 | public function RequireVerification() |
||
74 | |||
75 | /** |
||
76 | * Perorm setup when this controller is initialised |
||
77 | * |
||
78 | * @return void |
||
79 | */ |
||
80 | public function init() |
||
96 | |||
97 | /** |
||
98 | * Get the link to this controller |
||
99 | * |
||
100 | * @param string $action |
||
101 | * @return string|null |
||
102 | */ |
||
103 | public function Link($action = null) |
||
110 | |||
111 | /** |
||
112 | * Get an absolute link to this controller |
||
113 | * |
||
114 | * @param string $action |
||
115 | * @return string|null |
||
116 | */ |
||
117 | public function AbsoluteLink($action = null) |
||
121 | |||
122 | /** |
||
123 | * Get a relative (to the root url of the site) link to this |
||
124 | * controller |
||
125 | * |
||
126 | * @param string $action |
||
127 | * @return string|null |
||
128 | */ |
||
129 | public function RelativeLink($action = null) |
||
135 | |||
136 | /** |
||
137 | * Display the currently outstanding orders for the current user |
||
138 | * |
||
139 | */ |
||
140 | public function index() |
||
173 | |||
174 | public function edit() |
||
197 | |||
198 | public function changepassword() |
||
233 | |||
234 | /** |
||
235 | * Factory for generating a profile form. The form can be expanded using an |
||
236 | * extension class and calling the updateEditProfileForm method. |
||
237 | * |
||
238 | * @return Form |
||
239 | */ |
||
240 | public function EditAccountForm() |
||
248 | |||
249 | /** |
||
250 | * Factory for generating a change password form. The form can be expanded |
||
251 | * using an extension class and calling the updateChangePasswordForm method. |
||
252 | * |
||
253 | * @return Form |
||
254 | */ |
||
255 | public function ChangePasswordForm() |
||
278 | |||
279 | /** |
||
280 | * Return a list of nav items for managing a users profile. You can add new |
||
281 | * items to this menu using the "updateAccountMenu" extension |
||
282 | * |
||
283 | * @return ArrayList |
||
284 | */ |
||
285 | public function getAccountMenu() |
||
316 | |||
317 | public function providePermissions() |
||
334 | } |
||
335 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.