[ Index ]

PHP Cross Reference of DokuWiki




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

Admin Plugin Prototype Implements an admin interface in a plugin

Author: Christopher Smith
License: GPL 2 (http://www.gnu.org/licenses/gpl.html)
File Size: 131 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 8 functions


Functions that are not part of a class:

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

showInMenu()   X-Ref
Return true if the plugin should be shown in the admin menu

return: bool

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()

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