From 82f996a6acf974432917d0063056724719fba582 Mon Sep 17 00:00:00 2001 From: mak001 Date: Thu, 5 Apr 2018 14:06:55 -0500 Subject: [PATCH] Added extension documentation Fixed config loading issues --- _config/config.yml | 5 +++-- docs/en/developerguide/extending.md | 35 +++++++++++++++++++++++++++++ docs/en/index.md | 1 + 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 docs/en/developerguide/extending.md diff --git a/_config/config.yml b/_config/config.yml index 87f068a..84c2e94 100644 --- a/_config/config.yml +++ b/_config/config.yml @@ -17,8 +17,9 @@ Dynamic\Locator\Locator: --- Name: modules-locator -After: modules-other -Before: modules-framework +After: + - modules-other + - modules-framework --- SilverStripe\Core\Manifest\ModuleManifest: module_priority: diff --git a/docs/en/developerguide/extending.md b/docs/en/developerguide/extending.md new file mode 100644 index 0000000..35349b6 --- /dev/null +++ b/docs/en/developerguide/extending.md @@ -0,0 +1,35 @@ +## Extending +The locator has some custom extension points. + +### LocatorForm +#### updateLocatorFormFields(FieldList $fields) +Used to update the fields of the locator form. +Passed the current FieldList of the form. + +#### updateRequiredFields(Validator $validator) +Used to update the required fields of the locator form. +Passed the current Validator of the form. + +### LocatorController +#### overrideRadiusArray(array $radii) +Used to update or replace the radii used to make the radius dropdown. + +#### updateLocatorFilter(array $filter, HTTPRequest $request) +Used to update the filters used on the location list when `setLocations()` is called. +Passed the array of current filters and the current HTTPRequest. + +### updateLocatorFilterAny(array $filterAny, HTTPRequest $request) +Used to update the filter anys used on the location list when `setLocations()` is called. +Passed the array of current filter anys and the current HTTPRequest. + +### updateLocatorExclude(array $exclude, HTTPRequest $request) +Used to update the excludes used on the location list when `setLocations()` is called. +Passed the array of current excludes and the current HTTPRequest. + +### updateLocationList(ArrayList $locations) +Used to update the location list when `setLocations()` is called. +Passed the current list of locations after filters and excludes have been applied, but before distance has been applied. + +### updateListType(ArrayList $locations) +Used to update the location list's type when `setLocations()` is called. +Passed the current list of locations after filters, excludes, and distance have been applied and `updateLocationList()` has been run. diff --git a/docs/en/index.md b/docs/en/index.md index ec224bd..478f62b 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -10,3 +10,4 @@ See [Importing Locations](userguide/import.md) for information on importing Loca - [Setup](developerguide/setup.md) - [Customizing](developerguide/customizing.md) +- [Extending](developerguide/extending.md)