ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ILIAS\User\Provider\UserMetaBarProvider Class Reference

Class UserMetaBarProvider. More...

+ Inheritance diagram for ILIAS\User\Provider\UserMetaBarProvider:
+ Collaboration diagram for ILIAS\User\Provider\UserMetaBarProvider:

Public Member Functions

 getMetaBarItems ()
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\MetaBar\Provider\AbstractStaticMetaBarProvider
 __construct (Container $dic)
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 __construct (Container $dic)
 @inheritDoc More...
 
 getFullyQualifiedClassName ()
 @inheritDoc More...
 
 getProviderNameForPresentation ()
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 
 getMetaBarItems ()
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\MetaBar\Provider\MetaBarProviderInterface
 getProviderNameForPresentation ()
 

Additional Inherited Members

- Data Fields inherited from ILIAS\GlobalScreen\Scope\MetaBar\Provider\StaticMetaBarProvider
const PURPOSE_MBS = "meta_bar_static"
 
- Protected Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 globalScreen ()
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Scope\MetaBar\Provider\AbstractStaticMetaBarProvider
 $dic
 
 $if
 
 $meta_bar
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 $dic
 

Detailed Description

Member Function Documentation

◆ getMetaBarItems()

ILIAS\User\Provider\UserMetaBarProvider::getMetaBarItems ( )

@inheritDoc

Implements ILIAS\GlobalScreen\Scope\MetaBar\Provider\StaticMetaBarProvider.

Definition at line 19 of file UserMetaBarProvider.php.

19 : array
20 {
22 $f = $this->dic->ui()->factory();
23 $txt = function ($id) {
24 return $this->dic->language()->txt($id);
25 };
26 $mb = $this->globalScreen()->metaBar();
27 $id = function ($id) : IdentificationInterface {
28 return $this->if->identifier($id);
29 };
30
31 $children = array();
32 $children[] = $mb->linkItem($id('personal_profile'))
33 ->withAction("ilias.php?baseClass=ilDashboardGUI&cmd=jumpToProfile")
34 ->withTitle($txt("personal_profile"))
35 ->withPosition(1)
36 ->withSymbol($f->symbol()->icon()->custom(ilUtil::getImagePath("icon_profile.svg"), $txt("personal_profile")));
37
38 $children[] = $mb->linkItem($id('personal_settings'))
39 ->withAction("ilias.php?baseClass=ilDashboardGUI&cmd=jumpToSettings")
40 ->withTitle($txt("personal_settings"))
41 ->withPosition(2)
42 ->withSymbol($f->symbol()->icon()->custom(ilUtil::getImagePath("icon_personal_settings.svg"), $txt("personal_settings")));
43
44 $children[] = $mb->linkItem($id('logout'))
45 ->withAction("logout.php?lang=" . $this->dic->user()->getCurrentLanguage())
46 ->withPosition(3)
47 ->withTitle($txt("logout"))
48 ->withSymbol($f->symbol()->glyph()->logout());
49
50 // "User"-Menu
51 $item[] = $mb->topParentItem($id('user'))
52 ->withSymbol($this->dic->user()->getAvatar())
53 ->withTitle($this->dic->language()->txt("info_view_of_user"))
54 ->withPosition(4)
55 ->withVisibilityCallable($access_checks->isUserLoggedIn())
56 ->withChildren($children);
57
58 return $item;
59 }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$txt
Definition: error.php:13

References Vendor\Package\$f, $txt, ilUtil\getImagePath(), ILIAS\GlobalScreen\Helper\BasicAccessCheckClosures\getInstance(), and ILIAS\GlobalScreen\Provider\AbstractProvider\globalScreen().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: