diff options
Diffstat (limited to 'lib/public/AppFramework/Http/Template/IMenuAction.php')
-rw-r--r-- | lib/public/AppFramework/Http/Template/IMenuAction.php | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/lib/public/AppFramework/Http/Template/IMenuAction.php b/lib/public/AppFramework/Http/Template/IMenuAction.php new file mode 100644 index 00000000000..124e95fe019 --- /dev/null +++ b/lib/public/AppFramework/Http/Template/IMenuAction.php @@ -0,0 +1,51 @@ +<?php + +/** + * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCP\AppFramework\Http\Template; + +/** + * Interface IMenuAction + * + * @since 14.0 + */ +interface IMenuAction { + /** + * @since 14.0.0 + * @return string + */ + public function getId(): string; + + /** + * The translated label of the menu item. + * + * @since 14.0.0 + * @return string + */ + public function getLabel(): string; + + /** + * The link this menu item points to. + * + * @since 14.0.0 + * @return string + */ + public function getLink(): string; + + /** + * @since 14.0.0 + * @return int + */ + public function getPriority(): int; + + /** + * Custom render function. + * The returned HTML will be wrapped within a listitem element (`<li>...</li>`). + * + * @since 14.0.0 + * @return string + */ + public function render(): string; +} |