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 /** @inheritdoc */ 13 public function __construct($label = '') 14 { 15 parent::__construct(); 16 17 // Borrow the Profile language construct. 18 global $lang; 19 $this->label = $label ?: $lang['btn_profile'] . ' (2FA)'; 20 } 21 22 /** @inheritdoc */ 23 public function getType() 24 { 25 return 'twofactor_profile'; 26 } 27 28 /** @inheritdoc */ 29 public function getSvg() 30 { 31 return __DIR__ . '/admin.svg'; 32 } 33} 34