Files
ocis/extensions/settings/bundles.md
T
Felix Böhm 0b140f5eea commit f10950d6e8
Merge: 0eba04ba 8bc206e4
Author: Felix Böhm <felix@owncloud.com>
Date:   Tue Oct 6 15:20:43 2020 +0200

    Merge pull request #655 from owncloud/update-docs-rebased

    [docs-only] Update docs
2020-10-06 13:32:56 +00:00

1.9 KiB

title, date, weight, geekdocRepo, geekdocEditPath, geekdocFilePath
title date weight geekdocRepo geekdocEditPath geekdocFilePath
Settings Bundles 2020-05-04T00:00:00+00:00 50 https://github.com/owncloud/ocis edit/master/docs/extensions/settings bundles.md

A Settings Bundle is a collection of settings, uniquely identified by the key of the extension registering the bundle and the key of the bundle itself. It's purpose is to let oCIS extensions define settings and make them available to users. They are dynamically rendered into forms, available in the frontend.

As of now we support five different types of settings:

  • boolean
  • integer
  • string
  • single choice list of integers or strings
  • multiple choice list of integers or strings

Each Setting is uniquely identified by a key within the bundle. Some attributes depend on the chosen type of setting. Through the information provided with the attributes of the setting, the settings frontend dynamically renders form elements, allowing users to change their settings individually.

Example

{
  "identifier": {
    "extension": "ocis-accounts",
    "bundleKey": "profile"
  },
  "displayName": "Profile",
  "settings": [
    {
      "settingKey": "lastname",
      "displayName": "Lastname",
      "description": "Input for lastname",
      "stringValue": {
        "placeholder": "Set lastname"
      }
    },
    {
      "settingKey": "age",
      "displayName": "Age",
      "description": "Input for age",
      "intValue": {
        "min": "16",
        "max": "200",
        "step": "2",
        "placeholder": "Set age"
      }
    },
    {
      "settingKey": "timezone",
      "displayName": "Timezone",
      "description": "User timezone",
      "singleChoiceValue": {
        "options": [
          {
            "stringValue": "Europe/Berlin",
            "displayValue": "Europe/Berlin"
          },
          {
            "stringValue": "Asia/Kathmandu",
            "displayValue": "Asia/Kathmandu"
          }
        ]
      }
    }
  ]
}