2018-01-25 12:56:15 -05:00
|
|
|
<?php
|
2025-06-30 09:04:05 -04:00
|
|
|
|
2018-01-25 12:56:15 -05:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2018-01-25 12:56:15 -05:00
|
|
|
*/
|
|
|
|
|
namespace OCP\AppFramework\Http\Template;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Interface IMenuAction
|
|
|
|
|
*
|
|
|
|
|
* @since 14.0
|
|
|
|
|
*/
|
|
|
|
|
interface IMenuAction {
|
|
|
|
|
/**
|
|
|
|
|
* @since 14.0.0
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
public function getId(): string;
|
|
|
|
|
|
|
|
|
|
/**
|
2024-08-28 07:15:56 -04:00
|
|
|
* The translated label of the menu item.
|
|
|
|
|
*
|
2018-01-25 12:56:15 -05:00
|
|
|
* @since 14.0.0
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
public function getLabel(): string;
|
|
|
|
|
|
|
|
|
|
/**
|
2024-08-28 07:15:56 -04:00
|
|
|
* The link this menu item points to.
|
|
|
|
|
*
|
2018-01-25 12:56:15 -05:00
|
|
|
* @since 14.0.0
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
public function getLink(): string;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @since 14.0.0
|
|
|
|
|
* @return int
|
|
|
|
|
*/
|
|
|
|
|
public function getPriority(): int;
|
|
|
|
|
|
|
|
|
|
/**
|
2024-08-28 07:15:56 -04:00
|
|
|
* Custom render function.
|
|
|
|
|
* The returned HTML will be wrapped within a listitem element (`<li>...</li>`).
|
|
|
|
|
*
|
2018-01-25 12:56:15 -05:00
|
|
|
* @since 14.0.0
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
public function render(): string;
|
2019-11-22 14:52:10 -05:00
|
|
|
}
|