1<?php
2
3use dokuwiki\plugin\structgantt\meta\Gantt;
4
5/**
6 * DokuWiki Plugin structgantt (Syntax Component)
7 *
8 * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html
9 * @author  Andreas Gohr <gohr@cosmocode.de>
10 */
11class syntax_plugin_structgantt extends syntax_plugin_struct_table
12{
13    /** @var string which class to use for output */
14    protected $tableclass = Gantt::class;
15
16    /**
17     * Connect lookup pattern to lexer.
18     *
19     * @param string $mode Parser mode
20     */
21    public function connectTo($mode)
22    {
23        $this->Lexer->addSpecialPattern('----+ *struct gantt *-+\n.*?\n----+', $mode, 'plugin_structgantt');
24    }
25}
26