From d2116a5a3b34a0121ffe872676e99f04992c7229 Mon Sep 17 00:00:00 2001 From: Johan Vervloet <johan.vervloet@gmail.com> Date: Thu, 9 Nov 2017 22:56:20 +0100 Subject: [PATCH] Update setting.md Some more details about creating a settings page for an extension. --- docs/framework/setting.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/framework/setting.md b/docs/framework/setting.md index c2045f17..61504e2a 100644 --- a/docs/framework/setting.md +++ b/docs/framework/setting.md @@ -152,7 +152,10 @@ As with core settings, all settings declared in extensions should have appropria 1. Provide that the settings folder is declared [Multisite extension example](https://github.com/eileenmcnaughton/org.civicrm.multisite/blob/master/multisite.php#L347). 2. Declare settings as in the same standard as CiviCRM Core [Multisite extension example](https://github.com/eileenmcnaughton/org.civicrm.multisite/blob/master/settings/Multisite.setting.php). 3. Create Settings form, a [good example of generic metadata based settings form in an extension](https://github.com/eileenmcnaughton/nz.co.fuzion.civixero/blob/master/CRM/Civixero/Form/XeroSettings.php) - note that only the setting filter is non-generic -4. Use `cv api system.flush` or `Admin → System Settings → Cleanup Caches` to flush CiviCRM caches and register your new settings metadata. +4. Add [routing for your settings form](https://github.com/eileenmcnaughton/nz.co.fuzion.civixero/blob/master/xml/Menu/xerosync.xml). +5. Add [a template for your settings form](https://github.com/eileenmcnaughton/nz.co.fuzion.civixero/blob/master/templates/CRM/Civixero/Form/XeroSettings.tpl). +6. Add a menu item by implementing [hook_civicrm_navigationMenu](https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_navigationMenu). +7. Use `cv api system.flush` or `Admin → System Settings → Cleanup Caches` to flush CiviCRM caches and register your new settings metadata. ## Adding Setting Config to Admin Forms. -- GitLab