Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add note for plugin settings categories #224

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions plugin/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -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' => [
Expand All @@ -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' => [
Expand All @@ -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.
LukeTowers marked this conversation as resolved.
Show resolved Hide resolved
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.

Expand Down
Loading