xref: /plugin/dev/skel/syntax.php (revision 70316b849e063a6d74c051966388525c6a62b604)
1*70316b84SAndreas Gohr<?php
2*70316b84SAndreas Gohr/**
3*70316b84SAndreas Gohr * DokuWiki Plugin @@PLUGIN_NAME@@ (Syntax Component)
4*70316b84SAndreas Gohr *
5*70316b84SAndreas Gohr * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html
6*70316b84SAndreas Gohr * @author  @@AUTHOR_NAME@@ <@@AUTHOR_MAIL@@>
7*70316b84SAndreas Gohr */
8*70316b84SAndreas Gohrclass @@PLUGIN_COMPONENT_NAME@@ extends \dokuwiki\Extension\SyntaxPlugin
9*70316b84SAndreas Gohr{
10*70316b84SAndreas Gohr    /** @inheritDoc */
11*70316b84SAndreas Gohr    public function getType()
12*70316b84SAndreas Gohr    {
13*70316b84SAndreas Gohr        return 'FIXME: container|baseonly|formatting|substition|protected|disabled|paragraphs';
14*70316b84SAndreas Gohr    }
15*70316b84SAndreas Gohr
16*70316b84SAndreas Gohr    /** @inheritDoc */
17*70316b84SAndreas Gohr    public function getPType()
18*70316b84SAndreas Gohr    {
19*70316b84SAndreas Gohr        return 'FIXME: normal|block|stack';
20*70316b84SAndreas Gohr    }
21*70316b84SAndreas Gohr
22*70316b84SAndreas Gohr    /** @inheritDoc */
23*70316b84SAndreas Gohr    public function getSort()
24*70316b84SAndreas Gohr    {
25*70316b84SAndreas Gohr        return FIXME;
26*70316b84SAndreas Gohr    }
27*70316b84SAndreas Gohr
28*70316b84SAndreas Gohr    /** @inheritDoc */
29*70316b84SAndreas Gohr    public function connectTo($mode)
30*70316b84SAndreas Gohr    {
31*70316b84SAndreas Gohr        $this->Lexer->addSpecialPattern('<FIXME>', $mode, '@@SYNTAX_COMPONENT_NAME@@');
32*70316b84SAndreas Gohr//        $this->Lexer->addEntryPattern('<FIXME>', $mode, '@@SYNTAX_COMPONENT_NAME@@');
33*70316b84SAndreas Gohr    }
34*70316b84SAndreas Gohr
35*70316b84SAndreas Gohr//    /** @inheritDoc */
36*70316b84SAndreas Gohr//    public function postConnect()
37*70316b84SAndreas Gohr//    {
38*70316b84SAndreas Gohr//        $this->Lexer->addExitPattern('</FIXME>', '@@SYNTAX_COMPONENT_NAME@@');
39*70316b84SAndreas Gohr//    }
40*70316b84SAndreas Gohr
41*70316b84SAndreas Gohr    /** @inheritDoc */
42*70316b84SAndreas Gohr    public function handle($match, $state, $pos, Doku_Handler $handler)
43*70316b84SAndreas Gohr    {
44*70316b84SAndreas Gohr        $data = array();
45*70316b84SAndreas Gohr
46*70316b84SAndreas Gohr        return $data;
47*70316b84SAndreas Gohr    }
48*70316b84SAndreas Gohr
49*70316b84SAndreas Gohr    /** @inheritDoc */
50*70316b84SAndreas Gohr    public function render($mode, Doku_Renderer $renderer, $data)
51*70316b84SAndreas Gohr    {
52*70316b84SAndreas Gohr        if ($mode !== 'xhtml') {
53*70316b84SAndreas Gohr            return false;
54*70316b84SAndreas Gohr        }
55*70316b84SAndreas Gohr
56*70316b84SAndreas Gohr        return true;
57*70316b84SAndreas Gohr    }
58*70316b84SAndreas Gohr}
59*70316b84SAndreas Gohr
60