1<?php 2if (!defined('DOKU_INC')) die(); 3 4class action_plugin_fho extends DokuWiki_Action_Plugin { 5 6 public function register(Doku_Event_Handler $controller) { 7 $controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, 'handle_employee_configuration'); 8 } 9 10 public function handle_employee_configuration(Doku_Event $event, $param) { 11 // Read the employees from the DokuWiki configuration (comma separated string) 12 $employeeList = $this->getConf('employees'); 13 if ($employeeList) { 14 $employees = array_map('trim', explode(',', $employeeList)); // Convert to array 15 } else { 16 $employees = ['Mitarbeiter 1', 'Mitarbeiter 2', 'Mitarbeiter 3']; // Default employees 17 } 18 19 // Make the employee list available for the syntax plugin to display in the table 20 $GLOBALS['EMPLOYEE_LIST'] = $employees; 21 } 22} 23?> 24