1 | <?php |
||
5 | class InstagramAdmin extends ModelAdmin |
||
|
|||
6 | { |
||
7 | /** |
||
8 | * @var string |
||
9 | */ |
||
10 | private static $url_segment = 'instagram'; |
||
11 | |||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | private static $menu_title = 'Instagram'; |
||
16 | |||
17 | /** |
||
18 | * @var array |
||
19 | */ |
||
20 | private static $managed_models = [ |
||
21 | 'InstagramAccount', |
||
22 | ]; |
||
23 | |||
24 | /** |
||
25 | * @var array |
||
26 | */ |
||
27 | private static $allowed_actions = [ |
||
28 | 'ImportForm', |
||
29 | 'SearchForm', |
||
30 | 'OAuth', |
||
31 | ]; |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | */ |
||
36 | private static $menu_icon = 'silverstripe-instagram/images/instagram-logo.png'; |
||
37 | |||
38 | /** |
||
39 | * @param int $id |
||
40 | * @param FieldList $fields |
||
41 | * @return Form |
||
42 | */ |
||
43 | public function getEditForm($id = null, $fields = null) |
||
61 | |||
62 | /** |
||
63 | * Gets a InstagramAccount ID from the Session. |
||
64 | * |
||
65 | * @param string $state |
||
66 | * @return int|null |
||
67 | */ |
||
68 | private function getInstagramAccountIDFromSession($state = null) |
||
82 | |||
83 | /** |
||
84 | * Handles failed AOuth attempts. |
||
85 | * |
||
86 | * @param Form $form |
||
87 | * @return Controller |
||
88 | */ |
||
89 | private function handleOAuthError($form, $message = null) |
||
100 | |||
101 | /** |
||
102 | * OAuth callback handler. |
||
103 | * |
||
104 | * @param SS_HTTPRequest $request |
||
105 | */ |
||
106 | public function OAuth($request) |
||
154 | } |
||
155 | |||
182 |
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.