ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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

- 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

◆ getAllIdentifications()

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

Definition at line 32 of file SearchMetaBarProvider.php.

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

32  : array
33  {
34  return [$this->getId()];
35  }
+ Here is the call graph for this function:

◆ getId()

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

Definition at line 23 of file SearchMetaBarProvider.php.

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

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

◆ getMetaBarItems()

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

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

Definition at line 41 of file SearchMetaBarProvider.php.

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

41  : array
42  {
43  $content = function () {
44  $main_search = new ilMainMenuSearchGUI();
45  $html = "";
46 
47  // user interface plugin slot + default rendering
48  $uip = new ilUIHookProcessor(
49  "Services/MainMenu",
50  "main_menu_search",
51  array("main_menu_gui" => $this, "main_menu_search_gui" => $main_search)
52  );
53  if (!$uip->replaced()) {
54  $html = $main_search->getHTML();
55  }
56 
57  return $this->dic->ui()->factory()->legacy($uip->getHTML($html));
58  };
59 
60  $mb = $this->globalScreen()->metaBar();
61 
62  $item = $mb
63  ->topLegacyItem($this->getId())
64  ->withLegacyContent($content())
65  ->withSymbol($this->dic->ui()->factory()->symbol()->glyph()->search())
66  ->withTitle($this->dic->language()->txt("search"))
67  ->withPosition(1)
68  ->withAvailableCallable(
69  function () {
70  return (bool) $this->dic->rbac()->system()->checkAccess('search', ilSearchSettings::_getSearchSettingRefId());
71  }
72  );
73 
74  return [$item];
75  }
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: