Index: trunk/extensions/DataCenter/Views/Settings/Field.php |
— | — | @@ -10,9 +10,7 @@ |
11 | 11 | |
12 | 12 | /* Functions */ |
13 | 13 | |
14 | | - public function main( |
15 | | - $path |
16 | | - ) { |
| 14 | + public function main( $path ) { |
17 | 15 | $metaFields = DataCenterDB::getMetaFields(); |
18 | 16 | return DataCenterUI::renderLayout( |
19 | 17 | 'columns', |
— | — | @@ -58,9 +56,7 @@ |
59 | 57 | ); |
60 | 58 | } |
61 | 59 | |
62 | | - public function view( |
63 | | - $path |
64 | | - ) { |
| 60 | + public function view( $path ) { |
65 | 61 | $metaField = DataCenterDB::getMetaField( $path['id'] ); |
66 | 62 | return DataCenterUI::renderLayout( |
67 | 63 | 'columns', |
— | — | @@ -103,9 +99,7 @@ |
104 | 100 | ); |
105 | 101 | } |
106 | 102 | |
107 | | - public function remove( |
108 | | - $path |
109 | | - ) { |
| 103 | + public function remove( $path ) { |
110 | 104 | $metaField = DataCenterDB::getMetaField( $path['id'] ); |
111 | 105 | $metaFieldLinks = $metaField->getLinks(); |
112 | 106 | foreach ( $metaFieldLinks as $metaFieldLink ) { |
— | — | @@ -183,15 +177,11 @@ |
184 | 178 | ); |
185 | 179 | } |
186 | 180 | |
187 | | - public function add( |
188 | | - $path |
189 | | - ) { |
| 181 | + public function add( $path ) { |
190 | 182 | return $this->configure( $path ); |
191 | 183 | } |
192 | 184 | |
193 | | - public function configure( |
194 | | - $path |
195 | | - ) { |
| 185 | + public function configure( $path ) { |
196 | 186 | // Detects mode |
197 | 187 | if ( !$path['id'] ) { |
198 | 188 | // Creates new component |
Index: trunk/extensions/DataCenter/Views/Facilities.php |
— | — | @@ -10,12 +10,10 @@ |
11 | 11 | |
12 | 12 | /* Functions */ |
13 | 13 | |
14 | | - public function history( |
15 | | - $path |
16 | | - ) { |
| 14 | + public function history( $path ) { |
17 | 15 | if ( $path['type'] == 'location' ) { |
18 | 16 | $facility = DataCenterDB::getLocation( $path['id'] ); |
19 | | - } else if ( $path['type'] == 'space' ) { |
| 17 | + } elseif ( $path['type'] == 'space' ) { |
20 | 18 | $facility = DataCenterDB::getSpace( $path['id'] ); |
21 | 19 | } else { |
22 | 20 | return null; |
Index: trunk/extensions/DataCenter/Views/Plans.php |
— | — | @@ -10,9 +10,7 @@ |
11 | 11 | |
12 | 12 | /* Functions */ |
13 | 13 | |
14 | | - public function main( |
15 | | - $path |
16 | | - ) { |
| 14 | + public function main( $path ) { |
17 | 15 | $plans = DataCenterDB::getPlans( |
18 | 16 | DataCenterDB::buildSort( |
19 | 17 | 'meta', 'plan', array( 'space', 'tense DESC' ) |
Index: trunk/extensions/DataCenter/Views/Settings.php |
— | — | @@ -10,9 +10,7 @@ |
11 | 11 | |
12 | 12 | /* Functions */ |
13 | 13 | |
14 | | - public function main( |
15 | | - $path |
16 | | - ) { |
| 14 | + public function main( $path ) { |
17 | 15 | return DataCenterUI::renderLayout( |
18 | 16 | 'columns', |
19 | 17 | array( |
Index: trunk/extensions/DataCenter/Views/Assets.php |
— | — | @@ -41,9 +41,7 @@ |
42 | 42 | |
43 | 43 | /* Functions */ |
44 | 44 | |
45 | | - public function main( |
46 | | - $path |
47 | | - ) { |
| 45 | + public function main( $path ) { |
48 | 46 | if ( !isset( self::$options[$path['type']] ) ) { |
49 | 47 | return DataCenterUI::renderWidget( |
50 | 48 | 'body', array( |
— | — | @@ -127,9 +125,7 @@ |
128 | 126 | ); |
129 | 127 | } |
130 | 128 | |
131 | | - public function history( |
132 | | - $path |
133 | | - ) { |
| 129 | + public function history( $path ) { |
134 | 130 | $asset = DataCenterDB::getAsset( $path['type'], $path['id'] ); |
135 | 131 | return DataCenterUI::renderLayout( |
136 | 132 | 'columns', |
— | — | @@ -156,9 +152,7 @@ |
157 | 153 | ); |
158 | 154 | } |
159 | 155 | |
160 | | - public function export( |
161 | | - $path |
162 | | - ) { |
| 156 | + public function export( $path ) { |
163 | 157 | // Returns single columm layout with a table |
164 | 158 | return DataCenterUI::renderLayout( |
165 | 159 | 'columns', |
— | — | @@ -183,9 +177,7 @@ |
184 | 178 | ); |
185 | 179 | } |
186 | 180 | |
187 | | - public function view( |
188 | | - $path |
189 | | - ) { |
| 181 | + public function view( $path ) { |
190 | 182 | // Checks if the user did not provide enough information |
191 | 183 | if ( !$path['id'] ) { |
192 | 184 | // Returns error message |
— | — | @@ -257,9 +249,7 @@ |
258 | 250 | ); |
259 | 251 | } |
260 | 252 | |
261 | | - public function design( |
262 | | - $path |
263 | | - ) { |
| 253 | + public function design( $path ) { |
264 | 254 | $options = DataCenterViewModels::$options[$path['type']]; |
265 | 255 | if ( isset( $options['gallery'] ) ) { |
266 | 256 | // Gets all components from database |
— | — | @@ -300,15 +290,11 @@ |
301 | 291 | } |
302 | 292 | } |
303 | 293 | |
304 | | - public function deploy( |
305 | | - $path |
306 | | - ) { |
| 294 | + public function deploy( $path ) { |
307 | 295 | return $this->manage( $path ); |
308 | 296 | } |
309 | 297 | |
310 | | - public function manage( |
311 | | - $path |
312 | | - ) { |
| 298 | + public function manage( $path ) { |
313 | 299 | // Checks if... |
314 | 300 | if ( |
315 | 301 | // No rack asset was specified |
Index: trunk/extensions/DataCenter/Views/Models.php |
— | — | @@ -129,9 +129,7 @@ |
130 | 130 | |
131 | 131 | /* Functions */ |
132 | 132 | |
133 | | - public function main( |
134 | | - $path |
135 | | - ) { |
| 133 | + public function main( $path ) { |
136 | 134 | if ( !isset( self::$options[$path['type']] ) ) { |
137 | 135 | return 'MODELS'; |
138 | 136 | } |
— | — | @@ -195,9 +193,7 @@ |
196 | 194 | ); |
197 | 195 | } |
198 | 196 | |
199 | | - public function history( |
200 | | - $path |
201 | | - ) { |
| 197 | + public function history( $path ) { |
202 | 198 | $model = DataCenterDB::getModel( $path['type'], $path['id'] ); |
203 | 199 | return DataCenterUI::renderLayout( |
204 | 200 | 'columns', |
— | — | @@ -224,9 +220,7 @@ |
225 | 221 | ); |
226 | 222 | } |
227 | 223 | |
228 | | - public function view( |
229 | | - $path |
230 | | - ) { |
| 224 | + public function view( $path ) { |
231 | 225 | // Checks if the user did not provide enough information |
232 | 226 | if ( !$path['id'] ) { |
233 | 227 | // Returns error message |
— | — | @@ -310,9 +304,7 @@ |
311 | 305 | ); |
312 | 306 | } |
313 | 307 | |
314 | | - public function select( |
315 | | - $path |
316 | | - ) { |
| 308 | + public function select( $path ) { |
317 | 309 | // Checks if... |
318 | 310 | if ( |
319 | 311 | // There was only one parameter |
— | — | @@ -369,15 +361,11 @@ |
370 | 362 | } |
371 | 363 | } |
372 | 364 | |
373 | | - public function attach( |
374 | | - $path |
375 | | - ) { |
| 365 | + public function attach( $path ) { |
376 | 366 | return $this->configure( $path ); |
377 | 367 | } |
378 | 368 | |
379 | | - public function configure( |
380 | | - $path |
381 | | - ) { |
| 369 | + public function configure( $path ) { |
382 | 370 | // Checks if... |
383 | 371 | if ( |
384 | 372 | is_array( $path['parameter'] ) && |
— | — | @@ -489,15 +477,11 @@ |
490 | 478 | ); |
491 | 479 | } |
492 | 480 | |
493 | | - public function create( |
494 | | - $path |
495 | | - ) { |
| 481 | + public function create( $path ) { |
496 | 482 | return $this->modify( $path ); |
497 | 483 | } |
498 | 484 | |
499 | | - public function modify( |
500 | | - $path |
501 | | - ) { |
| 485 | + public function modify( $path ) { |
502 | 486 | // Checks if the type is supported |
503 | 487 | if ( !isset( self::$options[$path['type']]['gallery'] ) ) { |
504 | 488 | // Returns error message |
Index: trunk/extensions/DataCenter/Views/Search.php |
— | — | @@ -10,9 +10,7 @@ |
11 | 11 | |
12 | 12 | /* Functions */ |
13 | 13 | |
14 | | - public function main( |
15 | | - $path |
16 | | - ) { |
| 14 | + public function main( $path ) { |
17 | 15 | return DataCenterUI::renderLayout( |
18 | 16 | 'columns', |
19 | 17 | array( |
— | — | @@ -35,9 +33,7 @@ |
36 | 34 | ); |
37 | 35 | } |
38 | 36 | |
39 | | - public function results( |
40 | | - $path |
41 | | - ) { |
| 37 | + public function results( $path ) { |
42 | 38 | return DataCenterUI::renderLayout( |
43 | 39 | 'columns', |
44 | 40 | array( |
Index: trunk/extensions/DataCenter/Views/Facilities/Space.php |
— | — | @@ -10,9 +10,7 @@ |
11 | 11 | |
12 | 12 | /* Functions */ |
13 | 13 | |
14 | | - public function main( |
15 | | - $path |
16 | | - ) { |
| 14 | + public function main( $path ) { |
17 | 15 | // Gets all components from database |
18 | 16 | $spaces = DataCenterDB::getSpaces( |
19 | 17 | array_merge_recursive( |
— | — | @@ -73,9 +71,7 @@ |
74 | 72 | ); |
75 | 73 | } |
76 | 74 | |
77 | | - public function view( |
78 | | - $path |
79 | | - ) { |
| 75 | + public function view( $path ) { |
80 | 76 | // Checks if the user did not provide enough information |
81 | 77 | if ( !$path['id'] ) { |
82 | 78 | // Returns error message |
— | — | @@ -178,15 +174,11 @@ |
179 | 175 | ); |
180 | 176 | } |
181 | 177 | |
182 | | - public function add( |
183 | | - $path |
184 | | - ) { |
| 178 | + public function add( $path ) { |
185 | 179 | return $this->edit( $path ); |
186 | 180 | } |
187 | 181 | |
188 | | - public function edit( |
189 | | - $path |
190 | | - ) { |
| 182 | + public function edit( $path ) { |
191 | 183 | // Checks if... |
192 | 184 | if ( |
193 | 185 | // No space facility was specified |
— | — | @@ -246,7 +238,7 @@ |
247 | 239 | 'subject' => DataCenterUI::message( 'type', $path['type'] ) |
248 | 240 | ); |
249 | 241 | } |
250 | | - // Builds javascript to access renderable facility |
| 242 | + // Builds JavaScript to access renderable facility |
251 | 243 | $jsTarget = DataCenterJs::chain( |
252 | 244 | array( |
253 | 245 | "dataCenter.renderer.getTarget" => |
Index: trunk/extensions/DataCenter/Views/Facilities/Location.php |
— | — | @@ -10,9 +10,7 @@ |
11 | 11 | |
12 | 12 | /* Functions */ |
13 | 13 | |
14 | | - public function main( |
15 | | - $path |
16 | | - ) { |
| 14 | + public function main( $path ) { |
17 | 15 | // Gets all components from database |
18 | 16 | $locations = DataCenterDB::getLocations( |
19 | 17 | DataCenterDB::buildSort( |
— | — | @@ -42,7 +40,7 @@ |
43 | 41 | $tables[$tense] = null; |
44 | 42 | } |
45 | 43 | } |
46 | | - // Returns 2 columm layout with a table and a map widget |
| 44 | + // Returns 2 column layout with a table and a map widget |
47 | 45 | return DataCenterUI::renderLayout( |
48 | 46 | 'columns', |
49 | 47 | array( |
— | — | @@ -78,9 +76,7 @@ |
79 | 77 | ); |
80 | 78 | } |
81 | 79 | |
82 | | - public function view( |
83 | | - $path |
84 | | - ) { |
| 80 | + public function view( $path ) { |
85 | 81 | // Checks if the user did not provide enough information |
86 | 82 | if ( !$path['id'] ) { |
87 | 83 | // Returns error message |
— | — | @@ -167,15 +163,11 @@ |
168 | 164 | ); |
169 | 165 | } |
170 | 166 | |
171 | | - public function add( |
172 | | - $path |
173 | | - ) { |
| 167 | + public function add( $path ) { |
174 | 168 | return $this->edit( $path ); |
175 | 169 | } |
176 | 170 | |
177 | | - public function edit( |
178 | | - $path |
179 | | - ) { |
| 171 | + public function edit( $path ) { |
180 | 172 | // Detects mode |
181 | 173 | if ( !$path['id'] ) { |
182 | 174 | // Creates a new facility location |
— | — | @@ -222,7 +214,7 @@ |
223 | 215 | 'subject' => DataCenterUI::message( 'type', $path['type'] ) |
224 | 216 | ); |
225 | 217 | } |
226 | | - // Builds javascript that hooks the button into the geocoder |
| 218 | + // Builds JavaScript that hooks the button into the geocoder |
227 | 219 | $jsForm = 'document.form_save'; |
228 | 220 | $jsOut = DataCenterJs::callFunction( |
229 | 221 | 'addHandler', |
Index: trunk/extensions/DataCenter/Views/Overview.php |
— | — | @@ -10,9 +10,7 @@ |
11 | 11 | |
12 | 12 | /* Functions */ |
13 | 13 | |
14 | | - public function main( |
15 | | - $path |
16 | | - ) { |
| 14 | + public function main( $path ) { |
17 | 15 | return DataCenterUI::renderLayout( |
18 | 16 | 'columns', |
19 | 17 | array( |
Index: trunk/extensions/DataCenter/Views/Plans/Plan.php |
— | — | @@ -10,9 +10,7 @@ |
11 | 11 | |
12 | 12 | /* Functions */ |
13 | 13 | |
14 | | - public function view( |
15 | | - $path |
16 | | - ) { |
| 14 | + public function view( $path ) { |
17 | 15 | // Checks if the user did not provide enough information |
18 | 16 | if ( !$path['id'] ) { |
19 | 17 | // Returns error message |
— | — | @@ -202,9 +200,7 @@ |
203 | 201 | ); |
204 | 202 | } |
205 | 203 | |
206 | | - public function remove( |
207 | | - $path |
208 | | - ) { |
| 204 | + public function remove( $path ) { |
209 | 205 | // Gets link from database |
210 | 206 | $plan = DataCenterDB::getPlan( $path['id'] ); |
211 | 207 | // Gets links to plan |
— | — | @@ -277,15 +273,11 @@ |
278 | 274 | ); |
279 | 275 | } |
280 | 276 | |
281 | | - public function add( |
282 | | - $path |
283 | | - ) { |
| 277 | + public function add( $path ) { |
284 | 278 | return $this->configure( $path ); |
285 | 279 | } |
286 | 280 | |
287 | | - public function configure( |
288 | | - $path |
289 | | - ) { |
| 281 | + public function configure( $path ) { |
290 | 282 | // Detects mode |
291 | 283 | if ( !$path['id'] ) { |
292 | 284 | if ( |
Index: trunk/extensions/DataCenter/Views/Plans/Rack.php |
— | — | @@ -10,9 +10,7 @@ |
11 | 11 | |
12 | 12 | /* Functions */ |
13 | 13 | |
14 | | - public function view( |
15 | | - $path |
16 | | - ) { |
| 14 | + public function view( $path ) { |
17 | 15 | // Checks if the user did not provide enough information |
18 | 16 | if ( !$path['id'] ) { |
19 | 17 | // Returns error message |
— | — | @@ -179,9 +177,7 @@ |
180 | 178 | ); |
181 | 179 | } |
182 | 180 | |
183 | | - public function select( |
184 | | - $path |
185 | | - ) { |
| 181 | + public function select( $path ) { |
186 | 182 | // Checks if... |
187 | 183 | if ( |
188 | 184 | // No rack asset was specified |
— | — | @@ -321,9 +317,7 @@ |
322 | 318 | } |
323 | 319 | } |
324 | 320 | |
325 | | - public function remove( |
326 | | - $path |
327 | | - ) { |
| 321 | + public function remove( $path ) { |
328 | 322 | // Gets link from database |
329 | 323 | $rackLink = DataCenterDB::getAssetLink( $path['id'] ); |
330 | 324 | // Extracts rack from link |
— | — | @@ -407,15 +401,11 @@ |
408 | 402 | ); |
409 | 403 | } |
410 | 404 | |
411 | | - public function attach( |
412 | | - $path |
413 | | - ) { |
| 405 | + public function attach( $path ) { |
414 | 406 | return $this->configure( $path ); |
415 | 407 | } |
416 | 408 | |
417 | | - public function configure( |
418 | | - $path |
419 | | - ) { |
| 409 | + public function configure( $path ) { |
420 | 410 | // Checks if... |
421 | 411 | if ( |
422 | 412 | // No rack asset was specified |
Index: trunk/extensions/DataCenter/Views/Plans/Object.php |
— | — | @@ -10,9 +10,7 @@ |
11 | 11 | |
12 | 12 | /* Functions */ |
13 | 13 | |
14 | | - public function view( |
15 | | - $path |
16 | | - ) { |
| 14 | + public function view( $path ) { |
17 | 15 | // Checks if the user did not provide enough information |
18 | 16 | if ( !$path['id'] ) { |
19 | 17 | // Returns error message |
— | — | @@ -105,9 +103,7 @@ |
106 | 104 | ); |
107 | 105 | } |
108 | 106 | |
109 | | - public function select( |
110 | | - $path |
111 | | - ) { |
| 107 | + public function select( $path ) { |
112 | 108 | // Checks if... |
113 | 109 | if ( |
114 | 110 | // No rack asset was specified |
— | — | @@ -269,9 +265,7 @@ |
270 | 266 | } |
271 | 267 | } |
272 | 268 | |
273 | | - public function remove( |
274 | | - $path |
275 | | - ) { |
| 269 | + public function remove( $path ) { |
276 | 270 | // Gets link from database |
277 | 271 | $objectLink = DataCenterDB::getAssetLink( $path['id'] ); |
278 | 272 | // Extracts object from link |
— | — | @@ -364,15 +358,11 @@ |
365 | 359 | ); |
366 | 360 | } |
367 | 361 | |
368 | | - public function attach( |
369 | | - $path |
370 | | - ) { |
| 362 | + public function attach( $path ) { |
371 | 363 | return $this->configure( $path ); |
372 | 364 | } |
373 | 365 | |
374 | | - public function configure( |
375 | | - $path |
376 | | - ) { |
| 366 | + public function configure( $path ) { |
377 | 367 | // Checks if... |
378 | 368 | if ( |
379 | 369 | // No rack asset was specified |