Documentation

ActionGroup
in package
implements Countable, Serializable

A grouping of navigation actions, like a submenu.

Interfaces, Classes and Traits

Countable
Serializable

Table of Contents

DefaultGroup  = 'lotgd/core/default'
HiddenGroup  = 'lotgd/core/hidden'
$actions  : array<string|int, mixed>
$id  : string
$sortKey  : int
$title  : string
$viewpoint  : Viewpoint|null
__construct()  : mixed
Create a new ActionGroup, starting with an empty set of actions.
addAction()  : mixed
Adds a single action to the list of actions.
count()  : int
Returns the number of registered Actions for this group.
getActions()  : array<string|int, Action>
Returns the ordered array of actions.
getId()  : string
Returns the unique identifier for this group, in the vendor/module/group format.
getRenderedTitle()  : string
Returns the rendered title for this group.
getSortKey()  : int
Returns the sort key for this group. The ordering of the groups in the final menu displayed to users will be sorted by this key. The default menu's sort key is '0'.
getTitle()  : string
Returns the title for this group.
getViewpoint()  : Viewpoint|null
serialize()  : mixed
setActions()  : mixed
Sets the ordered array of actions.
setViewpoint()  : mixed
unserialize()  : mixed

Constants

DefaultGroup

public mixed DefaultGroup = 'lotgd/core/default'

HiddenGroup

public mixed HiddenGroup = 'lotgd/core/hidden'

Properties

Methods

__construct()

Create a new ActionGroup, starting with an empty set of actions.

public __construct(string $id, string $title, int $sortKey) : mixed
Parameters
$id : string

Unique identifier for this group, in the vendor/module/group format.

$title : string

Title to display to the end user. Empty string means no title.

$sortKey : int

Navigation menus are displayed in the order sorted by this integer.

Return values
mixed

addAction()

Adds a single action to the list of actions.

public addAction(Action $action) : mixed
Parameters
$action : Action
Return values
mixed

count()

Returns the number of registered Actions for this group.

public count() : int
Return values
int

getActions()

Returns the ordered array of actions.

public getActions() : array<string|int, Action>
Return values
array<string|int, Action>

getId()

Returns the unique identifier for this group, in the vendor/module/group format.

public getId() : string
Return values
string

getSortKey()

Returns the sort key for this group. The ordering of the groups in the final menu displayed to users will be sorted by this key. The default menu's sort key is '0'.

public getSortKey() : int
Return values
int

getTitle()

Returns the title for this group.

public getTitle() : string
Return values
string

serialize()

public serialize() : mixed
Return values
mixed

setActions()

Sets the ordered array of actions.

public setActions(array<string|int, Action$actions) : mixed
Parameters
$actions : array<string|int, Action>
Return values
mixed

unserialize()

public unserialize(mixed $serialized) : mixed
Parameters
$serialized : mixed
Return values
mixed

Search results