Lexer->addSpecialPattern('<[Bb]ugtree\s+[0-9]+[^>]*>', $mode, 'plugin_bugzillaint_tree'); } /** * Handle matches */ public function handle($match, $state, $pos, Doku_Handler $handler){ $matches = array(); // found tree if ( preg_match('/<[Bb]ugtree\s+([0-9]+)[^>]*>/', $match, $submatch) ) { $matches['tree'] = array( 'id' => $submatch[1], 'depth' => preg_match('/depth:([0-9])/i', $match, $found) ? $found[1] : $this->getConf('tree_depth'), 'hideResolved' => !!preg_match('/hideResolved/i', $match, $found), 'extras' => preg_match('/extras:([a-z_,]+)/i', $match, $found) ? trim($found[1]) : $this->getConf('list_default_extras') ); } return $matches; } /** * Render the output * * @param string $mode * @param Doku_Renderer $renderer * @param array $data * @return boolean */ public function render($mode, Doku_Renderer $renderer, $data) { if ($mode != 'xhtml') return false; // render tree if ( isset( $data['tree'] ) ) { $render = $this->loadHelper('bugzillaint_render', false); $attrs = $render->renderAttributes( $data['tree'] ); $label = $data['tree']['id']; $url = $this->getConf('show_baseurl') . $data['tree']['id']; $renderer->doc .= '
' . '

' . ' '.htmlspecialchars($label).'' . ' ' .htmlspecialchars($this->getLang('msg_blocked_by')). '' . '

' . ' ' . '
'; } return true; } }