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