[ Index ]

PHP Cross Reference of DokuWiki




/inc/Extension/ -> AdminPlugin.php (summary)

(no description)

File Size: 123 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

AdminPlugin:: (7 methods):

Class: AdminPlugin  - X-Ref

Admin Plugin Prototype

Implements an admin interface in a plugin

getMenuText($language)   X-Ref
Return the text that is displayed at the main admin menu
(Default localized language string 'menu' is returned, override this function for setting another name)

return: string menu string
param: string $language language code

getMenuIcon()   X-Ref
Return the path to the icon being displayed in the main admin menu.
By default it tries to find an 'admin.svg' file in the plugin directory.
(Override this function for setting another image)

Important: you have to return a single path, monochrome SVG icon! It has to be
under 2 Kilobytes!

We recommend icons from https://materialdesignicons.com/ or to use a matching

return: string full path to the icon file

getMenuSort()   X-Ref
Determine position in list in admin window
Lower values are sorted up

return: int

handle()   X-Ref
Carry out required processing

isAccessibleByCurrentUser()   X-Ref
Checks if access should be granted to this admin plugin

return: bool true if the current user may access this admin plugin

forAdminOnly()   X-Ref
Return true for access only by admins (config:superuser) or false if managers are allowed as well

return: bool

getTOC()   X-Ref
Return array with ToC items. Items can be created with the html_mktocitem()

see: html_mktocitem()
see: tpl_toc()
return: array