All Classes Namespaces Files Functions Variables Pages
ToolbarItemInterface Interface Reference
Inheritance diagram for ToolbarItemInterface:
ClearCacheToolbarItem HelpToolbarItem LiveSearchToolbarItem ShortcutToolbarItem SystemInformationToolbarItem UserToolbarItem OpendocsToolbarItem ActionToolbarItem WorkspaceSelectorToolbarItem

Public Member Functions

 checkAccess ()
 getItem ()
 hasDropDown ()
 getDropDown ()
 getAdditionalAttributes ()
 getIndex ()

Detailed Description

Interface for classes which extend the backend by adding items to the top toolbar

: This interface is FIRST DRAFT and still WILL CHANGE

See also

Definition at line 23 of file ToolbarItemInterface.php.

Member Function Documentation

checkAccess ( )

Checks whether the user has access to this toolbar item : Split into two methods a permission method and a "hasContent" or similar

bool TRUE if user has access, FALSE if not

Implemented in SystemInformationToolbarItem, ActionToolbarItem, ShortcutToolbarItem, ClearCacheToolbarItem, HelpToolbarItem, WorkspaceSelectorToolbarItem, OpendocsToolbarItem, and UserToolbarItem.

getAdditionalAttributes ( )

Returns an array with additional attributes added to containing tag of the item.

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', )

array List item HTML attributes

Implemented in SystemInformationToolbarItem, ShortcutToolbarItem, ActionToolbarItem, ClearCacheToolbarItem, OpendocsToolbarItem, WorkspaceSelectorToolbarItem, UserToolbarItem, HelpToolbarItem, and LiveSearchToolbarItem.

getDropDown ( )
getIndex ( )

Returns an integer between 0 and 100 to determine the position of this item relative to others

By default, extensions should return 50 to be sorted between main core items and other items that should be on the very right.

int 0 .. 100

Implemented in ShortcutToolbarItem, SystemInformationToolbarItem, OpendocsToolbarItem, ActionToolbarItem, ClearCacheToolbarItem, WorkspaceSelectorToolbarItem, UserToolbarItem, HelpToolbarItem, and LiveSearchToolbarItem.