ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
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 ()
 
 getMetaBarItems ()
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\MetaBar\Provider\AbstractStaticMetaBarProvider
 __construct (Container $dic)
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 __construct (Container $dic)
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 
- 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 ( )

Definition at line 33 of file SearchMetaBarProvider.php.

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

33  : array
34  {
35  return [$this->getId()];
36  }
+ 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.

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

24  : IdentificationInterface
25  {
26  return $this->if->identifier('search');
27  }
+ Here is the caller graph for this function:

◆ getMetaBarItems()

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

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

Definition at line 42 of file SearchMetaBarProvider.php.

References ilSearchSettings\_getSearchSettingRefId(), ILIAS\Search\Provider\SearchMetaBarProvider\getId(), and ILIAS\GlobalScreen\Provider\AbstractProvider\globalScreen().

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  }
static _getSearchSettingRefId()
Read the ref_id of Search Settings object.
+ Here is the call graph for this function:

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