*/ // See help: https://www.dokuwiki.org/devel:toolbar class action_plugin_bpmnio_toolbar extends DokuWiki_Action_Plugin { public function register(Doku_Event_Handler $controller) { $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'handle_toolbar'); } public function handle_toolbar(Doku_Event $event) { $basedir = DOKU_BASE . 'lib/plugins/bpmnio/images/toolbar/'; $event->data[] = array( 'type' => 'picker', 'title' => $this->getLang('picker'), 'icon' => $basedir . 'picker.png', 'list' => array( array( 'type' => 'format', 'class' => 'plugin-bpmnio icon-large', 'title' => $this->getLang('bpmn_add'), 'icon' => $basedir . 'bpmn_add.png', 'open' => '\n' . $this->_get_open_text_bpmn(), 'close' => $this->_get_close_text_bpmn() . '\n\n', ), array( 'type' => 'format', 'class' => 'plugin-bpmnio icon-large', 'title' => $this->getLang('dmn_add'), 'icon' => $basedir . 'dmn_add.png', 'open' => '\n' . $this->_get_open_text_dmn(), 'close' => $this->_get_close_text_dmn() . '\n\n', ) ), ); } private function _get_open_text_bpmn() { return << SequenceFlow_1 SequenceFlow_1 SequenceFlow_121ul2c SequenceFlow_0nuwads SequenceFlow_2 SequenceFlow_2 SequenceFlow_0snv4kp SequenceFlow_0nuwads SequenceFlow_121ul2c SequenceFlow_0snv4kp XML; } private function _get_open_text_dmn() { return << season guestCount "Winter" <= 8 "Spareribs" "Winter" > 8 "Pasta" "Summer" > 10 "Light salad" "Summer" <= 10 "Beans salad" "Spring" < 10 "Stew" "Spring" >= 10 "Steak" temperature >30 "Summer" <10 "Winter" [10..30] "Spring" dayType "Weekday" 4 "Holiday" 10 "Weekend" 15 Week day or week end XML; } }