| 1 | <?php |
||
| 21 | class AdminMenu extends Widget |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * Link to user profile. |
||
| 25 | * |
||
| 26 | * @var string |
||
| 27 | */ |
||
| 28 | public $profileLink = '/profile'; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Link to sign-out action. |
||
| 32 | * |
||
| 33 | * @var string |
||
| 34 | */ |
||
| 35 | public $signOutLink = '/sign-out'; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * This array contain a key->value pairs where key - is link name and value is link |
||
| 39 | * that will be rendered in "user-body" section of menu. |
||
| 40 | * |
||
| 41 | * @var string[] |
||
| 42 | */ |
||
| 43 | public $userBody = []; |
||
| 44 | |||
| 45 | /** |
||
| 46 | * User model. |
||
| 47 | * |
||
| 48 | * @var AdminMenuInterface |
||
| 49 | */ |
||
| 50 | private $user; |
||
| 51 | |||
| 52 | /** |
||
| 53 | * Setter for the User model. |
||
| 54 | * |
||
| 55 | * @param AdminMenuInterface $user |
||
| 56 | */ |
||
| 57 | public function setUser(AdminMenuInterface $user) |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @return string |
||
| 64 | */ |
||
| 65 | public function run() |
||
| 74 | } |
||
| 75 |