172b54c1bSAndreas Gohr<?php 272b54c1bSAndreas Gohr 372b54c1bSAndreas Gohrnamespace dokuwiki\plugin\twofactor; 472b54c1bSAndreas Gohr 572b54c1bSAndreas Gohruse dokuwiki\Menu\Item\Profile; 672b54c1bSAndreas Gohr 772b54c1bSAndreas Gohr/** 872b54c1bSAndreas Gohr * Menu Item to open the user's 2FA profile 972b54c1bSAndreas Gohr */ 1072b54c1bSAndreas Gohrclass MenuItem extends Profile 1172b54c1bSAndreas Gohr{ 1272b54c1bSAndreas Gohr 1372b54c1bSAndreas Gohr /** @inheritdoc */ 1472b54c1bSAndreas Gohr public function __construct($label = '') 1572b54c1bSAndreas Gohr { 1672b54c1bSAndreas Gohr parent::__construct(); 1772b54c1bSAndreas Gohr 1872b54c1bSAndreas Gohr // Borrow the Profile language construct. 1972b54c1bSAndreas Gohr global $lang; 2072b54c1bSAndreas Gohr $this->label = $label ?: $lang['btn_profile'] . ' (2FA)'; 2172b54c1bSAndreas Gohr 2272b54c1bSAndreas Gohr } 2372b54c1bSAndreas Gohr 2472b54c1bSAndreas Gohr /** @inheritdoc */ 2572b54c1bSAndreas Gohr public function getType() 2672b54c1bSAndreas Gohr { 2772b54c1bSAndreas Gohr return 'twofactor_profile'; 2872b54c1bSAndreas Gohr } 29*24f76e8eSAndreas Gohr 30*24f76e8eSAndreas Gohr /** @inheritdoc */ 31*24f76e8eSAndreas Gohr public function getSvg() 32*24f76e8eSAndreas Gohr { 33*24f76e8eSAndreas Gohr return __DIR__ . '/admin.svg'; 34*24f76e8eSAndreas Gohr } 35*24f76e8eSAndreas Gohr 3672b54c1bSAndreas Gohr} 37