Developing admin pages

From KnowledgeTree Document Management Made Simple

Jump to: navigation, search

Administration pages are dynamically created based on the categories and pages registered by plugins.

Admin Categories don't require specific classes to be created, and work with strings:

    $oPlugin->registerAdminCategory("principals", _("Users and Groups"), 
        _("Control which users can log in, and are part of which groups and organisational units from these management panels."));

Admin pages are just standard dispatcher pages that extend from the KTAdminDispatcher class:

require_once(KT_LIB_DIR . '/dispatcher.inc.php');
class DeletedDocumentsDispatcher extends KTAdminDispatcher {
...
}

Admin pages are registered with the plugin they are associated:

    $oPlugin->registerAdminPage("expunge",'DeletedDocumentsDispatcher','storage', _('Expunge Deleted Documents'),
        _('Permanently expunge deleted documents.'), 'admin/deletedDocuments.php');
  • The first parameter is the short web path name (so this page would be admin.php/storage/expunge)
  • The second parameter is the name of the class that represents the page
  • The third paramater is the category in which the page resides
  • The fourth parameter is the title/heading given to the admin page in the category listing
  • The fifth parameter is the description given in the category listing
  • The sixth parameter is the path to the implementation of the class listed in the second parameter
Personal tools