diff options
Diffstat (limited to 'apps/files_sharing/src/services/TabSections.js')
-rw-r--r-- | apps/files_sharing/src/services/TabSections.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/apps/files_sharing/src/services/TabSections.js b/apps/files_sharing/src/services/TabSections.js new file mode 100644 index 00000000000..ab1237e7044 --- /dev/null +++ b/apps/files_sharing/src/services/TabSections.js @@ -0,0 +1,33 @@ +/** + * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +/** + * Callback to render a section in the sharing tab. + * + * @callback registerSectionCallback + * @param {undefined} el - Deprecated and will always be undefined (formerly the root element) + * @param {object} fileInfo - File info object + */ + +export default class TabSections { + + _sections + + constructor() { + this._sections = [] + } + + /** + * @param {registerSectionCallback} section To be called to mount the section to the sharing sidebar + */ + registerSection(section) { + this._sections.push(section) + } + + getSections() { + return this._sections + } + +} |