functions = $functions; $this->language = $language; } /** * Assign functions defined in this class to event listeners in the core. * * @static * @return array * @access public */ static public function getSubscribedEvents() { return [ 'core.modify_module_row' => 'module_names', ]; } /** * Localise the APS module titles. * * @event core.modify_module_row * @param \phpbb\event\data $event The event object * @return void * @access public */ public function module_names(\phpbb\event\data $event) { $module = $event['module_row']; $langname = $module['langname']; switch ($langname) { case 'ACP_APS_MODE_POINTS': case 'MCP_APS_POINTS': case 'UCP_APS_POINTS': $module['lang'] = $this->language->lang($langname, ucfirst($this->functions->get_name())); break; default: return; break; } $event['module_row'] = $module; } }