1<?php
2
3namespace dokuwiki\plugin\talkpage;
4
5use dokuwiki\Menu\Item\AbstractItem;
6
7/** @inheritdoc */
8class MenuItem extends AbstractItem
9{
10
11    protected $type = 'show';
12
13    /** @inheritdoc */
14    public function __construct()
15    {
16        parent::__construct();
17
18        /** @var \syntax_plugin_talkpage $syntax */
19        $syntax = plugin_load('syntax', 'talkpage');
20
21        $info = $syntax->getLink();
22        $this->id = $info['goto'];
23        $this->nofollow = isset($info['attr']['rel']);
24        $this->label = $info['text'];
25        $this->svg = __DIR__ . '/svg/' . $info['type'] . '.svg';
26    }
27
28}
29