ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\User\Presentation\UserMetaBarProvider Class Reference
+ Inheritance diagram for ILIAS\User\Presentation\UserMetaBarProvider:
+ Collaboration diagram for ILIAS\User\Presentation\UserMetaBarProvider:

Public Member Functions

 getMetaBarItems ()
 @inheritcoc 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 (protected Container $dic)
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 
 getMetaBarItems ()
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\MetaBar\Provider\MetaBarProviderInterface
 getProviderNameForPresentation ()
 

Additional Inherited Members

- Protected Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 globalScreen ()
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Scope\MetaBar\Provider\AbstractStaticMetaBarProvider
Container $dic
 
IdentificationProviderInterface $if
 
MetaBarItemFactory $meta_bar
 

Detailed Description

Member Function Documentation

◆ getMetaBarItems()

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

@inheritcoc

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

Definition at line 35 of file UserMetaBarProvider.php.

35 : array
36 {
38 $f = $this->dic->ui()->factory();
39 $txt = function (string $id): string {
40 return $this->dic->language()->txt($id);
41 };
42 $mb = $this->globalScreen()->metaBar();
43 $id = function (string $id): IdentificationInterface {
44 return $this->if->identifier($id);
45 };
46
47 $children = [];
48 $children[] = $mb->linkItem($id('personal_profile'))
49 ->withAction("ilias.php?baseClass=ilDashboardGUI&cmd=jumpToProfile")
50 ->withTitle($txt("personal_profile"))
51 ->withPosition(1)
52 ->withSymbol($f->symbol()->icon()->custom(ilUtil::getImagePath("standard/icon_profile.svg"), $txt("personal_profile")));
53
54 $children[] = $mb->linkItem($id('personal_settings'))
55 ->withAction("ilias.php?baseClass=ilDashboardGUI&cmd=jumpToSettings")
56 ->withTitle($txt("personal_settings"))
57 ->withPosition(2)
58 ->withSymbol($f->symbol()->icon()->custom(ilUtil::getImagePath("page_editor/icon_personal_settings.svg"), $txt("personal_settings")));
59
60 $children[] = $mb->linkItem($id('logout'))
62 ->withPosition(3)
63 ->withTitle($txt("logout"))
64 ->withSymbol($f->symbol()->glyph()->logout());
65
66 // "User"-Menu
67 $item[] = $mb->topParentItem($id('user'))
68 ->withSymbol($this->dic->user()->getAvatar())
69 ->withTitle($this->dic->language()->txt("info_view_of_user"))
70 ->withPosition(4)
71 ->withVisibilityCallable($access_checks->isUserLoggedIn())
72 ->withChildren($children);
73
74 return $item;
75 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
static logoutUrl(array $parameters=[])
Return the logout URL with a valid CSRF token.
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
$txt
Definition: error.php:31
withAction(URI|Signal|string $action)
withSymbol(Symbol $symbol)
@inheritDoc

References Vendor\Package\$f, $id, $txt, ilUtil\getImagePath(), ILIAS\GlobalScreen\Helper\BasicAccessCheckClosuresSingleton\getInstance(), ILIAS\GlobalScreen\Provider\AbstractProvider\globalScreen(), ilStartUpGUI\logoutUrl(), ILIAS\GlobalScreen\Scope\Footer\Factory\withAction(), ILIAS\GlobalScreen\Scope\MainMenu\Factory\withSymbol(), and ILIAS\GlobalScreen\Scope\Footer\Factory\withTitle().

+ Here is the call graph for this function:

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