| @@ 280-291 (lines=12) @@ | ||
| 277 | * |
|
| 278 | * @return ViewableData_Customised |
|
| 279 | */ |
|
| 280 | public function index(SS_HTTPRequest $request) |
|
| 281 | { |
|
| 282 | $locations = $this->getLocations(); |
|
| 283 | ||
| 284 | if ($locations->canSortBy('distance')) { |
|
| 285 | $locations = $locations->sort('distance'); |
|
| 286 | } |
|
| 287 | ||
| 288 | return $this->customise(array( |
|
| 289 | 'Locations' => $locations, |
|
| 290 | )); |
|
| 291 | } |
|
| 292 | ||
| 293 | /** |
|
| 294 | * Return a XML feed of all locations marked "show in locator" |
|
| @@ 299-310 (lines=12) @@ | ||
| 296 | * @param SS_HTTPRequest $request |
|
| 297 | * @return HTMLText |
|
| 298 | */ |
|
| 299 | public function xml(SS_HTTPRequest $request) |
|
| 300 | { |
|
| 301 | $locations = $this->getLocations(); |
|
| 302 | ||
| 303 | if ($locations->canSortBy('distance')) { |
|
| 304 | $locations = $locations->sort('distance'); |
|
| 305 | } |
|
| 306 | ||
| 307 | return $this->customise(array( |
|
| 308 | 'Locations' => $locations, |
|
| 309 | ))->renderWith('LocationXML'); |
|
| 310 | } |
|
| 311 | ||
| 312 | /** |
|
| 313 | * @return ArrayList|DataList |
|