abstract class UserMenu (View source)

A list of components to render in the user menu.

Traits

Methods

static void
add($content = null, int $position = 0, string|null $key = null)

Add an item to the list.

static void
replace(string $key, $content)

Replace an existing item in the list.

static void
remove(string $key)

Remove an item from the list.

static array|null
get(string $key)

Get an item in the list.

static array
build()

Get the resulting list in order.

Details

static void add($content = null, int $position = 0, string|null $key = null)

Add an item to the list.

Parameters

$content
int $position
string|null $key

Return Value

void

static void replace(string $key, $content)

Replace an existing item in the list.

Parameters

string $key
$content

Return Value

void

static void remove(string $key)

Remove an item from the list.

Parameters

string $key

Return Value

void

static array|null get(string $key)

Get an item in the list.

Parameters

string $key

Return Value

array|null

static array build()

Get the resulting list in order.

Return Value

array