19 declare(strict_types=1);
63 $this->
ui = $DIC->ui();
64 $this->gs = $DIC->globalScreen();
65 $this->lang = $DIC->language();
73 return $this->content ?? $this->
ui->factory()->legacy(
"");
81 $this->gs->collector()->metaBar()->collectOnce();
82 if (!$this->gs->collector()->metaBar()->hasItems()) {
85 $f = $this->
ui->factory();
86 $meta_bar =
$f->mainControls()->metaBar();
88 foreach ($this->gs->collector()->metaBar()->getItemsForUIRepresentation() as $item) {
90 $component = $item->getRenderer()->getComponentForItem($item);
91 if ($this->isComponentSupportedForCombinedSlate($component)) {
92 $meta_bar = $meta_bar->withAdditionalEntry($item->getProviderIdentification()->getInternalIdentifier(), $component);
105 $this->gs->collector()->mainmenu()->collectOnce();
106 $this->gs->collector()->tool()->collectOnce();
109 if (!$this->gs->collector()->mainmenu()->hasVisibleItems()
110 && !$this->gs->collector()->tool()->hasVisibleItems()) {
114 $f = $this->
ui->factory();
115 $main_bar =
$f->mainControls()->mainBar();
117 foreach ($this->gs->collector()->mainmenu()->getItemsForUIRepresentation() as $item) {
121 $component = $item->getTypeInformation()->getRenderer()->getComponentForItem($item,
false);
122 $identifier = $this->
hash($item->getProviderIdentification()->serialize());
124 if ($this->isComponentSupportedForCombinedSlate($component)) {
125 $main_bar = $main_bar->withAdditionalEntry($identifier, $component);
130 $grid_icon =
$f->symbol()->icon()->custom(
ilUtil::getImagePath(
"icon_tool.svg"), $this->lang->txt(
'more'));
132 if ($this->gs->collector()->tool()->hasItems()) {
133 $tools_button =
$f->button()->bulky($grid_icon, $this->lang->txt(
'tools'),
"#")->
withEngagedState(
true);
134 $main_bar = $main_bar->withToolsButton($tools_button);
138 foreach ($this->gs->collector()->tool()->getItemsForUIRepresentation() as $tool) {
143 $component = $tool->getTypeInformation()->getRenderer()->getComponentForItem($tool,
false);
145 $identifier = $this->
hash($tool->getProviderIdentification()->serialize());
146 $close_button = null;
147 if ($tool->hasCloseCallback()) {
148 $close_button = $this->
ui->factory()->button()->close()->withOnLoadCode(
static function (
string $id) use ($identifier) {
150 return "$('#$id').on('click', function(){ 152 url: 'src/GlobalScreen/Client/callback_handler.php?$key_item=$identifier' 154 console.log('done closing'); 159 $main_bar = $main_bar->withAdditionalToolEntry($identifier, $component, $tool->isInitiallyHidden(), $close_button);
175 $f = $this->
ui->factory();
177 foreach ($DIC[
'ilLocator']->getItems() as $item) {
178 if (empty($item[
'title']) || empty($item[
'link'])) {
181 $crumbs[] =
$f->link()->standard($item[
'title'], $item[
"link"]);
184 return $f->breadcrumbs($crumbs);
194 return $this->
ui->factory()->image()
195 ->standard($std_logo, $this->lang->txt(
'rep_main_page'))
206 return $this->
ui->factory()->image()
207 ->standard($responsive_logo, $this->lang->txt(
'rep_main_page'))
221 $std_logo_link = ilUserUtil::getStartingPointAsUrl();
222 if (!$std_logo_link) {
223 $std_logo_link =
"./goto.php?target=root_1";
225 return $std_logo_link;
235 foreach ($this->gs->collector()->notifications()->getAdministrativeNotifications() as $adn) {
236 $system_infos[] = $adn->getRenderer($this->
ui->factory())->getNotificationComponentForItem($adn);
239 return $system_infos;
247 return $this->
ui->factory()->mainControls()->footer([]);
279 $toast_container = $this->
ui->factory()->toast()->container();
281 foreach ($this->gs->collector()->toasts()->getToasts() as $toast) {
282 $renderer = $toast->getRenderer();
283 $toast_container = $toast_container->withAdditionalToast($renderer->getToastComponentForItem($toast));
286 return $toast_container;
Class StandardPagePartProvider.
This describes the MainBar.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
Interface PagePartProvider.
trait SlateSessionStateCode
Class.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Provides fluid interface to RBAC services.
This describes the MetaBar.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This describes the Footer.