[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/lib/plugins/ -> admin.php (summary)

Admin Plugin Prototype

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

Defines 1 class

DokuWiki_Admin_Plugin:: (8 methods):
  getMenuText()
  getMenuIcon()
  getMenuSort()
  handle()
  html()
  isAccessibleByCurrentUser()
  forAdminOnly()
  getTOC()


Class: DokuWiki_Admin_Plugin  - X-Ref

All DokuWiki plugins to extend the admin function
need to inherit from this 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)

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

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
style.

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


html()   X-Ref
Output html of the admin page


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