1 | <?php |
||
3 | class CMSHelp extends Page_Controller implements PermissionProvider |
||
|
|||
4 | { |
||
5 | |||
6 | /** |
||
7 | *@var String name of the directory in which the help files are kept |
||
8 | * |
||
9 | */ |
||
10 | private static $help_file_directory_name = "_help"; |
||
11 | |||
12 | /** |
||
13 | *@var String name of the directory in which the help files are kept |
||
14 | * |
||
15 | */ |
||
16 | private static $dev_file_directory_name = "_dev"; |
||
17 | |||
18 | |||
19 | /** |
||
20 | *@var String urlsegment for the controller |
||
21 | * |
||
22 | */ |
||
23 | private static $url_segment = "admin/help"; |
||
24 | |||
25 | private static $permission_code = "CMS_HELP_FILES_PERMISSION_CODE"; |
||
26 | |||
27 | /** |
||
28 | *@var String urlsegment for the controller |
||
29 | * |
||
30 | */ |
||
31 | private static $allowed_actions = array( |
||
32 | 'download' => 'CMS_HELP_FILES_PERMISSION_CODE' |
||
33 | ); |
||
34 | |||
35 | /** |
||
36 | * standard SS Method |
||
37 | * |
||
38 | */ |
||
39 | public function init() |
||
49 | |||
50 | |||
51 | /** |
||
52 | * standard SS Method |
||
53 | * |
||
54 | */ |
||
55 | public function index() |
||
59 | |||
60 | public function getContent() |
||
64 | |||
65 | |||
66 | /** |
||
67 | * returns the Link to the controller |
||
68 | * |
||
69 | * @return String - |
||
70 | */ |
||
71 | public function Link($action = "") |
||
79 | |||
80 | public function download($request) |
||
94 | |||
95 | /** |
||
96 | * @return ArrayList of help files |
||
97 | * |
||
98 | * |
||
99 | */ |
||
100 | public function HelpFiles() |
||
112 | |||
113 | /** |
||
114 | * @return String - title for project |
||
115 | * |
||
116 | * |
||
117 | */ |
||
118 | public function SiteTitle() |
||
126 | |||
127 | |||
128 | /** |
||
129 | * @param String $location - folder location without start and end slahs (e.g. assets/myfolder ) |
||
130 | * @return Array - array of help files |
||
131 | * |
||
132 | * |
||
133 | */ |
||
134 | public static function get_list_of_files($location) |
||
157 | |||
158 | |||
159 | /** |
||
160 | * @param String $directory - location of the directory |
||
161 | * @param Array $extensionArray - array of extensions to include (e.g. Array("png", "mov");) |
||
162 | * |
||
163 | * @return Array - list of all files in a directory |
||
164 | */ |
||
165 | public static function get_list_of_files_in_directory($directory, $extensionArray) |
||
193 | |||
194 | |||
195 | |||
196 | |||
197 | /** |
||
198 | * returns the Link to the controller |
||
199 | * @param String $string - input |
||
200 | * @return String |
||
201 | */ |
||
202 | private static function add_space_before_capital($string) |
||
209 | |||
210 | public function providePermissions() |
||
219 | } |
||
220 |
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.