1<?php 2/** 3 * @license See LICENSE file 4 * @author Jaap de Haan <jaap.dehaan@color-of-code.de> 5 */ 6 7// See help: 8// * https://www.dokuwiki.org/devel:section_editor 9// * https://www.dokuwiki.org/devel:releases:refactor2021 10 11class action_plugin_bpmnio_editor extends DokuWiki_Action_Plugin 12{ 13 public function register(Doku_Event_Handler $controller) 14 { 15 $controller->register_hook('HTML_SECEDIT_BUTTON', 'BEFORE', $this, 'secedit_button'); 16 } 17 18 function secedit_button(Doku_Event $event) 19 { 20 if ($this->_shall_ignore($event)) return; 21 22 $event->data['name'] = $this->getLang('edit_diagram'); 23 } 24 25 private function _shall_ignore(Doku_Event $event) 26 { 27 if ($event->data['target'] !== 'plugin_bpmnio') 28 return true; 29 return false; 30 } 31} 32