*/ class admin_plugin_tplinc extends DokuWiki_Admin_Plugin { /** @var helper_plugin_tplinc */ protected $helper; /** * admin_plugin_tplinc constructor. */ public function __construct() { $this->helper = plugin_load('helper', 'tplinc'); } /** * @return bool true if only access for superuser, false is for superusers and moderators */ public function forAdminOnly() { return true; } /** * Should carry out any processing required by the plugin. */ public function handle() { global $INPUT; if ($INPUT->str('action') == 'save' && checkSecurityToken()) { if ($this->helper->saveAssignments($INPUT->arr('a'))) { msg($this->getLang('saved'), 1); } } } /** * Render HTML output, e.g. helpful text and a form */ public function html() { global $ID; echo $this->locale_xhtml('intro'); echo '
'; echo $this->locale_xhtml('help'); } /** * One row in the table * * @param array $assignment * @param int $row the row counter */ protected function assignmentRow($assignment, $row) { list($pattern, $page, $location, $skipacl) = $assignment; echo '