ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 (protected Container $dic)
 
 getFullyQualifiedClassName ()
 
 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
 

Detailed Description

Member Function Documentation

◆ getAllIdentifications()

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

@inheritDoc

Definition at line 49 of file SearchMetaBarProvider.php.

49 : array
50 {
51 return [$this->getId()];
52 }

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 40 of file SearchMetaBarProvider.php.

40 : IdentificationInterface
41 {
42 return $this->if->identifier('search');
43 }

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 58 of file SearchMetaBarProvider.php.

58 : array
59 {
60 $content = function () {
61 $main_search = new ilMainMenuSearchGUI();
62 $html = "";
63
64 // user interface plugin slot + default rendering
65 $uip = new ilUIHookProcessor(
66 "components/ILIAS/MainMenu",
67 "main_menu_search",
68 array("main_menu_gui" => $this, "main_menu_search_gui" => $main_search)
69 );
70 if (!$uip->replaced()) {
71 $html = $main_search->getHTML();
72 }
73
74 return $this->dic->ui()->factory()->legacy()->content($uip->getHTML($html))->withAdditionalOnLoadCode(
75 fn($id) => 'il.SearchMainMenu.init()'
76 );
77 };
78
79 $mb = $this->globalScreen()->metaBar();
80
81 $item = $mb
82 ->topLegacyItem($this->getId())
83 ->withLegacyContent($content())
84 ->withSymbol($this->dic->ui()->factory()->symbol()->glyph()->search())
85 ->withTitle($this->dic->language()->txt("search"))
86 ->withPosition(2)
87 ->withAvailableCallable(
88 function () {
89 return $this->dic->rbac()->system()->checkAccess('search', ilSearchSettings::_getSearchSettingRefId());
90 }
91 );
92
93 return [$item];
94 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
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 $id, 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: