From d02fe56fbb318e4d8d7c969afb1c55bb89ce7ffb Mon Sep 17 00:00:00 2001 From: Damien MATHIEU Date: Thu, 19 Dec 2024 15:38:34 +0100 Subject: [PATCH 1/2] Add note for plugin settings categories --- plugin/settings.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugin/settings.md b/plugin/settings.md index a7c07070..95c5b0ba 100644 --- a/plugin/settings.md +++ b/plugin/settings.md @@ -108,7 +108,7 @@ The backend contains a dedicated area for housing settings and configuration, it The backend settings navigation links can be extended by overriding the `registerSettings` method inside the [Plugin registration class](registration#registration-file). When you create a configuration link you have two options - create a link to a specific backend page, or create a link to a settings model. The next example shows how to create a link to a backend page. ```php -public function registerSettings() +public function registerSettings(): array { return [ 'location' => [ @@ -129,7 +129,7 @@ public function registerSettings() The following example creates a link to a settings model. Settings models is a part of the settings API which is described above in the [Database settings](#database-settings) section. ```php -public function registerSettings() +public function registerSettings(): array { return [ 'settings' => [ @@ -145,6 +145,10 @@ public function registerSettings() ]; } ``` +#### Properties + +The optional `category` parameter is used by the backend settings page to organize links. If catergory is not provided, the new link will be added to the misc category. +You can define your own link category or use one of the default provided by [`SettingsManager` constants](../../api/System/Classes/SettingsManager#constants). The optional `keywords` parameter is used by the settings search feature. If keywords are not provided, the search uses only the settings item label and description. From 698b9042557c72d2cfa0963649c42380b681a795 Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Thu, 19 Dec 2024 19:51:58 -0600 Subject: [PATCH 2/2] Update plugin/settings.md --- plugin/settings.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/settings.md b/plugin/settings.md index 95c5b0ba..197b13de 100644 --- a/plugin/settings.md +++ b/plugin/settings.md @@ -147,7 +147,7 @@ public function registerSettings(): array ``` #### Properties -The optional `category` parameter is used by the backend settings page to organize links. If catergory is not provided, the new link will be added to the misc category. +The optional `category` parameter is used by the backend settings page to organize links. If a category is not provided, the new link will be added to the `Misc` category. You can define your own link category or use one of the default provided by [`SettingsManager` constants](../../api/System/Classes/SettingsManager#constants). The optional `keywords` parameter is used by the settings search feature. If keywords are not provided, the search uses only the settings item label and description.