19 declare(strict_types=1);
64 $this->
ui = $DIC->ui();
65 $this->gs = $DIC->globalScreen();
66 $this->lang = $DIC->language();
72 return $this->content ?? $this->
ui->factory()->legacy(
"");
78 $this->gs->collector()->metaBar()->collectOnce();
79 if (!$this->gs->collector()->metaBar()->hasItems()) {
82 $f = $this->
ui->factory();
83 $meta_bar =
$f->mainControls()->metaBar();
85 foreach ($this->gs->collector()->metaBar()->getItemsForUIRepresentation() as $item) {
87 $component = $item->getRenderer()->getComponentForItem($item);
88 if ($this->isComponentSupportedForCombinedSlate($component)) {
89 $meta_bar = $meta_bar->withAdditionalEntry($item->getProviderIdentification()->getInternalIdentifier(), $component);
100 $this->gs->collector()->mainmenu()->collectOnce();
101 $this->gs->collector()->tool()->collectOnce();
104 if (!$this->gs->collector()->mainmenu()->hasVisibleItems()
105 && !$this->gs->collector()->tool()->hasVisibleItems()) {
109 $f = $this->
ui->factory();
110 $main_bar =
$f->mainControls()->mainBar();
112 foreach ($this->gs->collector()->mainmenu()->getItemsForUIRepresentation() as $item) {
116 $component = $item->getTypeInformation()->getRenderer()->getComponentForItem($item,
false);
117 $identifier = $this->
hash($item->getProviderIdentification()->serialize());
119 if ($this->isComponentSupportedForCombinedSlate($component)) {
120 $main_bar = $main_bar->withAdditionalEntry($identifier, $component);
125 $grid_icon =
$f->symbol()->icon()->custom(
ilUtil::getImagePath(
"standard/icon_tool.svg"), $this->lang->txt(
'more'));
127 if ($this->gs->collector()->tool()->hasItems()) {
128 $tools_button =
$f->button()->bulky($grid_icon, $this->lang->txt(
'tools'),
"#")->
withEngagedState(
true);
129 $main_bar = $main_bar->withToolsButton($tools_button);
133 foreach ($this->gs->collector()->tool()->getItemsForUIRepresentation() as $tool) {
138 $component = $tool->getTypeInformation()->getRenderer()->getComponentForItem($tool,
false);
140 $identifier = $this->
hash($tool->getProviderIdentification()->serialize());
141 $close_button = null;
142 if ($tool->hasCloseCallback()) {
143 $close_button = $this->
ui->factory()->button()->close()->withOnLoadCode(
static function (
string $id) use ($identifier):
string {
145 return "$('#$id').on('click', function(){ 147 url: 'callback_handler.php?$key_item=$identifier' 149 console.log('done closing'); 154 $main_bar = $main_bar->withAdditionalToolEntry($identifier, $component, $tool->isInitiallyHidden(), $close_button);
168 $f = $this->
ui->factory();
170 foreach ($DIC[
'ilLocator']->getItems() as $item) {
171 if (empty($item[
'title'])) {
174 if (empty($item[
'link'])) {
177 $crumbs[] =
$f->link()->standard($item[
'title'], $item[
"link"]);
180 return $f->breadcrumbs($crumbs);
188 return $this->
ui->factory()->image()
189 ->standard($std_logo, $this->lang->txt(
'rep_main_page'))
198 return $this->
ui->factory()->image()
199 ->standard($responsive_logo, $this->lang->txt(
'rep_main_page'))
211 $std_logo_link = ilUserUtil::getStartingPointAsUrl();
212 if ($std_logo_link ===
'' || $std_logo_link ===
'0') {
213 return "./goto.php?target=root_1";
215 return $std_logo_link;
223 foreach ($this->gs->collector()->notifications()->getAdministrativeNotifications() as $adn) {
224 $system_infos[] = $adn->getRenderer($this->
ui->factory())->getNotificationComponentForItem($adn);
227 return $system_infos;
233 $footer = $this->
ui->factory()->mainControls()->footer();
235 $collector = $this->gs->collector()->footer();
237 $collector->collectOnce();
239 foreach ($collector->getItemsForUIRepresentation() as $item) {
240 $footer = $renderer_factory->addToFooter($item, $footer);
267 $toast_container = $this->
ui->factory()->toast()->container();
269 foreach ($this->gs->collector()->toasts()->getToasts() as $toast) {
271 $toast_container = $toast_container->withAdditionalToast(
$renderer->getToastComponentForItem($toast));
274 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.
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...