ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator 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 (protected 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
 

Detailed Description

Member Function Documentation

◆ getAllIdentifications()

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

Definition at line 49 of file SearchMetaBarProvider.php.

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

49  : array
50  {
51  return [$this->getId()];
52  }
+ 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.

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

40  : IdentificationInterface
41  {
42  return $this->if->identifier('search');
43  }
+ Here is the caller graph for this function:

◆ getMetaBarItems()

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

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

Definition at line 58 of file SearchMetaBarProvider.php.

References $id, ilSearchSettings\_getSearchSettingRefId(), ILIAS\Search\Provider\SearchMetaBarProvider\getId(), ILIAS\GlobalScreen\Provider\AbstractProvider\globalScreen(), ILIAS\UI\Implementation\Component\withAdditionalOnLoadCode(), and ILIAS\GlobalScreen\Scope\Footer\Factory\withTitle().

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  }
static _getSearchSettingRefId()
Read the ref_id of Search Settings object.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:

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