xref: /plugin/twofactor/MenuItem.php (revision 24f76e8e89ecd77b1c8e20df4c14817392b9723f)
1<?php
2
3namespace dokuwiki\plugin\twofactor;
4
5use dokuwiki\Menu\Item\Profile;
6
7/**
8 * Menu Item to open the user's 2FA profile
9 */
10class MenuItem extends Profile
11{
12
13    /** @inheritdoc */
14    public function __construct($label = '')
15    {
16        parent::__construct();
17
18        // Borrow the Profile  language construct.
19        global $lang;
20        $this->label = $label ?: $lang['btn_profile'] . ' (2FA)';
21
22    }
23
24    /** @inheritdoc */
25    public function getType()
26    {
27        return 'twofactor_profile';
28    }
29
30    /** @inheritdoc */
31    public function getSvg()
32    {
33        return __DIR__ . '/admin.svg';
34    }
35
36}
37