ToolbarItemInterface
Interface for classes which extend the backend by adding items to the top toolbar
Table of Contents
Methods
- checkAccess() : bool
- Checks whether the user has access to this toolbar item
- getAdditionalAttributes() : array<string|int, mixed>
- Returns an array with additional attributes added to containing <li> tag of the item.
- getDropDown() : string
- Render "drop down" part of this toolbar
- getIndex() : int
- Returns an integer between 0 and 100 to determine the position of this item relative to others
- getItem() : string
- Render "item" part of this toolbar
- hasDropDown() : bool
- TRUE if this toolbar item has a collapsible drop down
Methods
checkAccess()
Checks whether the user has access to this toolbar item
public
checkAccess() : bool
Tags
Return values
bool —TRUE if user has access, FALSE if not
getAdditionalAttributes()
Returns an array with additional attributes added to containing <li> tag of the item.
public
getAdditionalAttributes() : array<string|int, mixed>
Typical usages are additional css classes and data-* attributes, classes may be merged with other classes needed by the framework. Do NOT set an id attribute here.
array( 'class' => 'my-class', 'data-foo' => '42', )
Return values
array<string|int, mixed> —List item HTML attributes
getDropDown()
Render "drop down" part of this toolbar
public
getDropDown() : string
Return values
string —Drop down HTML
getIndex()
Returns an integer between 0 and 100 to determine the position of this item relative to others
public
getIndex() : int
By default, extensions should return 50 to be sorted between main core items and other items that should be on the very right.
Return values
int —0 .. 100
getItem()
Render "item" part of this toolbar
public
getItem() : string
Return values
string —Toolbar item HTML
hasDropDown()
TRUE if this toolbar item has a collapsible drop down
public
hasDropDown() : bool