mode type * ie * * array('container', 'formatting', 'substition', 'protected', 'disabled', 'paragraphs') * * array of one or more of the mode types {@link $PARSER_MODES} in Parser.php */ public function getAllowedTypes(): array { /** * Tweak: `paragraphs` is not in the allowed type */ return array('container', 'formatting', 'substition', 'protected', 'disabled'); } function getSort(): int { return 999; } function connectTo($mode) { // One pattern to not compete between pattern // this pattern ensure that the tag // (ie that `accordion` will not intercept also the tag `accordionitem`) $pattern = XmlTagProcessing::START_TAG_PATTERN; $this->Lexer->addEntryPattern($pattern, $mode, PluginUtility::getModeFromTag($this->getPluginComponent())); } public function postConnect() { $this->Lexer->addExitPattern('', PluginUtility::getModeFromTag($this->getPluginComponent())); } function handle($match, $state, $pos, Doku_Handler $handler): array { return XmlTagProcessing::handleStatic($match, $state, $pos, $handler, $this); } /** * Render the output * @param string $format * @param Doku_Renderer $renderer * @param array $data - what the function handle() return'ed * @return boolean - rendered correctly? (however, returned value is not used at the moment) * @see DokuWiki_Syntax_Plugin::render() * * */ function render($format, Doku_Renderer $renderer, $data): bool { return XmlTagProcessing::renderStatic($format, $renderer, $data, $this); } }