ILIAS  release_8 Revision v8.24
ILIAS\Search\Provider\SearchMetaBarProvider Class Reference

Class SearchMetaBarProvider. More...

+ Inheritance diagram for ILIAS\Search\Provider\SearchMetaBarProvider:
+ Collaboration diagram for ILIAS\Search\Provider\SearchMetaBarProvider:

Public Member Functions

 getAllIdentifications ()
 @inheritDoc More...
 
 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 ()
 

Private Member Functions

 getId ()
 

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
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
Container $dic
 

Detailed Description

Member Function Documentation

◆ getAllIdentifications()

ILIAS\Search\Provider\SearchMetaBarProvider::getAllIdentifications ( )

@inheritDoc

Definition at line 33 of file SearchMetaBarProvider.php.

33 : array
34 {
35 return [$this->getId()];
36 }

References ILIAS\Search\Provider\SearchMetaBarProvider\getId().

+ Here is the call graph for this function:

◆ getId()

ILIAS\Search\Provider\SearchMetaBarProvider::getId ( )
private
Returns
IdentificationInterface

Definition at line 24 of file SearchMetaBarProvider.php.

24 : IdentificationInterface
25 {
26 return $this->if->identifier('search');
27 }

Referenced by ILIAS\Search\Provider\SearchMetaBarProvider\getAllIdentifications(), and ILIAS\Search\Provider\SearchMetaBarProvider\getMetaBarItems().

+ Here is the caller graph for this function:

◆ getMetaBarItems()

ILIAS\Search\Provider\SearchMetaBarProvider::getMetaBarItems ( )

@inheritDoc

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

Definition at line 42 of file SearchMetaBarProvider.php.

42 : array
43 {
44 $content = function () {
45 $main_search = new ilMainMenuSearchGUI();
46 $html = "";
47
48 // user interface plugin slot + default rendering
49 $uip = new ilUIHookProcessor(
50 "Services/MainMenu",
51 "main_menu_search",
52 array("main_menu_gui" => $this, "main_menu_search_gui" => $main_search)
53 );
54 if (!$uip->replaced()) {
55 $html = $main_search->getHTML();
56 }
57
58 return $this->dic->ui()->factory()->legacy($uip->getHTML($html));
59 };
60
61 $mb = $this->globalScreen()->metaBar();
62
63 $item = $mb
64 ->topLegacyItem($this->getId())
65 ->withLegacyContent($content())
66 ->withSymbol($this->dic->ui()->factory()->symbol()->glyph()->search())
67 ->withTitle($this->dic->language()->txt("search"))
68 ->withPosition(1)
69 ->withAvailableCallable(
70 function () {
71 return $this->dic->rbac()->system()->checkAccess('search', ilSearchSettings::_getSearchSettingRefId());
72 }
73 );
74
75 return [$item];
76 }
Add a search box to main menu.
static _getSearchSettingRefId()
Read the ref_id of Search Settings object.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ilSearchSettings\_getSearchSettingRefId(), ILIAS\Search\Provider\SearchMetaBarProvider\getId(), 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: