Nextcloud PHP API (master)

SimpleMenuAction
in package
implements IMenuAction

Class SimpleMenuAction

Tags
since
14.0.0

Table of Contents

Interfaces

IMenuAction
Interface IMenuAction

Properties

$detail  : string
$icon  : string
$id  : string
$label  : string
$link  : string
$priority  : int

Methods

__construct()  : mixed
SimpleMenuAction constructor.
getData()  : array{id: string, label: string, href: string, icon: string, details: string|null}
Return JSON data to let the frontend render the menu entry.
getIcon()  : string
The icon CSS class to use.
getId()  : string
getLabel()  : string
The translated label of the menu item.
getLink()  : string
The link this menu item points to.
getPriority()  : int
render()  : string
Custom render function.

Properties

Methods

__construct()

SimpleMenuAction constructor.

public __construct(string $id, string $label, string $icon[, string $link = '' ][, int $priority = 100 ][, string $detail = '' ]) : mixed
Parameters
$id : string
$label : string
$icon : string
$link : string = ''
$priority : int = 100
$detail : string = ''
Tags
since
14.0.0

getData()

Return JSON data to let the frontend render the menu entry.

public getData() : array{id: string, label: string, href: string, icon: string, details: string|null}
Tags
since
31.0.0
Return values
array{id: string, label: string, href: string, icon: string, details: string|null}

getIcon()

The icon CSS class to use.

public getIcon() : string
Tags
since
14.0.0
Return values
string

getLabel()

The translated label of the menu item.

public getLabel() : string
Tags
since
14.0.0
Return values
string

The link this menu item points to.

public getLink() : string
Tags
since
14.0.0
Return values
string

getPriority()

public getPriority() : int
Tags
since
14.0.0
Return values
int

render()

Custom render function.

public render() : string

The returned HTML must be wrapped within a listitem (<li>...</li>).

  • If an empty string is returned, the default design is used (based on the label and link specified).
Tags
since
14.0.0
Return values
string

        
On this page

Search results