19 declare(strict_types=1);
60 $this->
ui = $DIC->ui();
61 $this->gs = $DIC->globalScreen();
62 $this->lang = $DIC->language();
68 return $this->content ?? $this->
ui->factory()->legacy()->content(
"");
74 $this->gs->collector()->metaBar()->collectOnce();
75 if (!$this->gs->collector()->metaBar()->hasItems()) {
78 $f = $this->
ui->factory();
79 $meta_bar =
$f->mainControls()->metaBar();
81 foreach ($this->gs->collector()->metaBar()->getItemsForUIRepresentation() as $item) {
83 $component = $item->getRenderer()->getComponentForItem($item);
84 if ($this->isComponentSupportedForCombinedSlate($component)) {
85 $meta_bar = $meta_bar->withAdditionalEntry($item->getProviderIdentification()->getInternalIdentifier(), $component);
96 $this->gs->collector()->mainmenu()->collectOnce();
97 $this->gs->collector()->tool()->collectOnce();
100 if (!$this->gs->collector()->mainmenu()->hasVisibleItems()
101 && !$this->gs->collector()->tool()->hasVisibleItems()) {
105 $f = $this->
ui->factory();
106 $main_bar =
$f->mainControls()->mainBar();
108 foreach ($this->gs->collector()->mainmenu()->getItemsForUIRepresentation() as $item) {
112 $component = $item->getTypeInformation()->getRenderer()->getComponentForItem($item,
false);
113 $identifier = $this->
hash($item->getProviderIdentification()->serialize());
115 if ($this->isComponentSupportedForCombinedSlate($component)) {
116 $main_bar = $main_bar->withAdditionalEntry($identifier, $component);
121 $grid_icon =
$f->symbol()->icon()->custom(
ilUtil::getImagePath(
"standard/icon_tool.svg"), $this->lang->txt(
'more'));
123 if ($this->gs->collector()->tool()->hasItems()) {
124 $tools_button =
$f->button()->bulky($grid_icon, $this->lang->txt(
'tools'),
"#")->
withEngagedState(
true);
125 $main_bar = $main_bar->withToolsButton($tools_button);
129 foreach ($this->gs->collector()->tool()->getItemsForUIRepresentation() as $tool) {
134 $component = $tool->getTypeInformation()->getRenderer()->getComponentForItem($tool,
false);
136 $identifier = $this->
hash($tool->getProviderIdentification()->serialize());
137 $close_button =
null;
138 if ($tool->hasCloseCallback()) {
139 $close_button = $this->
ui->factory()->button()->close()->withOnLoadCode(
static function (
string $id) use ($identifier):
string {
141 return "$('#$id').on('click', function(){ 143 url: 'callback_handler.php?$key_item=$identifier' 145 console.log('done closing'); 150 $main_bar = $main_bar->withAdditionalToolEntry($identifier, $component, $tool->isInitiallyHidden(), $close_button);
164 $f = $this->
ui->factory();
166 foreach ($DIC[
'ilLocator']->getItems() as $item) {
167 if (empty($item[
'title'])) {
170 if (empty($item[
'link'])) {
173 $crumbs[] =
$f->link()->standard($item[
'title'], $item[
"link"]);
176 return $f->breadcrumbs($crumbs);
184 return $this->
ui->factory()->image()
185 ->standard($std_logo, $this->lang->txt(
'rep_main_page'))
194 return $this->
ui->factory()->image()
195 ->standard($responsive_logo, $this->lang->txt(
'rep_main_page'))
207 $std_logo_link = ilUserUtil::getStartingPointAsUrl();
208 if ($std_logo_link ===
'' || $std_logo_link ===
'0') {
209 return "./goto.php?target=root_1";
211 return $std_logo_link;
219 foreach ($this->gs->collector()->notifications()->getAdministrativeNotifications() as $adn) {
220 $system_infos[] = $adn->getRenderer($this->
ui->factory())->getNotificationComponentForItem($adn);
223 return $system_infos;
229 $footer = $this->
ui->factory()->mainControls()->footer();
231 $collector = $this->gs->collector()->footer();
233 $collector->collectOnce();
235 foreach ($collector->getItemsForUIRepresentation() as $item) {
236 $footer = $renderer_factory->addToFooter($item, $footer);
263 $toast_container = $this->
ui->factory()->toast()->container();
265 foreach ($this->gs->collector()->toasts()->getToasts() as $toast) {
267 $toast_container = $toast_container->withAdditionalToast(
$renderer->getToastComponentForItem($toast));
270 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...
Interface PagePartProvider.
trait SlateSessionStateCode
Class.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Provides fluid interface to RBAC services.
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
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...