From 42c2870a34a345aabdf35fb49fa8aa0b54fde2b2 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 27 Apr 2018 21:02:25 +0200 Subject: plugin prototype adjustments They are now proper abstract classes --- lib/plugins/admin.php | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'lib/plugins/admin.php') diff --git a/lib/plugins/admin.php b/lib/plugins/admin.php index 4e1cbbb33..a1d99a412 100644 --- a/lib/plugins/admin.php +++ b/lib/plugins/admin.php @@ -2,17 +2,13 @@ /** * Admin Plugin Prototype * - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * @author Christopher Smith - */ -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); - -/** * All DokuWiki plugins to extend the admin function * need to inherit from this class + * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * @author Christopher Smith */ -class DokuWiki_Admin_Plugin extends DokuWiki_Plugin { +abstract class DokuWiki_Admin_Plugin extends DokuWiki_Plugin { /** * Return the text that is displayed at the main admin menu @@ -62,15 +58,13 @@ class DokuWiki_Admin_Plugin extends DokuWiki_Plugin { * Carry out required processing */ public function handle() { - trigger_error('handle() not implemented in '.get_class($this), E_USER_WARNING); + // some plugins might not need this } /** * Output html of the admin page */ - public function html() { - trigger_error('html() not implemented in '.get_class($this), E_USER_WARNING); - } + abstract public function html(); /** * Return true for access only by admins (config:superuser) or false if managers are allowed as well -- cgit v1.2.3