19 declare(strict_types=1);
74 $this->
ui = $DIC->ui();
75 $this->gs = $DIC->globalScreen();
76 $this->lang = $DIC->language();
84 return $this->content ?? $this->
ui->factory()->legacy(
"");
92 $this->gs->collector()->metaBar()->collectOnce();
93 if (!$this->gs->collector()->metaBar()->hasItems()) {
96 $f = $this->
ui->factory();
97 $meta_bar =
$f->mainControls()->metaBar();
99 foreach ($this->gs->collector()->metaBar()->getItemsForUIRepresentation() as $item) {
101 $component = $item->getRenderer()->getComponentForItem($item);
102 if ($this->isComponentSupportedForCombinedSlate($component)) {
103 $meta_bar = $meta_bar->withAdditionalEntry($item->getProviderIdentification()->getInternalIdentifier(), $component);
116 $this->gs->collector()->mainmenu()->collectOnce();
117 $this->gs->collector()->tool()->collectOnce();
120 if (!$this->gs->collector()->mainmenu()->hasVisibleItems()
121 && !$this->gs->collector()->tool()->hasVisibleItems()) {
125 $f = $this->
ui->factory();
126 $main_bar =
$f->mainControls()->mainBar();
128 foreach ($this->gs->collector()->mainmenu()->getItemsForUIRepresentation() as $item) {
132 $component = $item->getTypeInformation()->getRenderer()->getComponentForItem($item,
false);
133 $identifier = $this->
hash($item->getProviderIdentification()->serialize());
135 if ($this->isComponentSupportedForCombinedSlate($component)) {
136 $main_bar = $main_bar->withAdditionalEntry($identifier, $component);
141 $grid_icon =
$f->symbol()->icon()->custom(
ilUtil::getImagePath(
"outlined/icon_tool.svg"), $this->lang->txt(
'more'));
142 if ($this->gs->collector()->tool()->hasItems()) {
143 $tools_button =
$f->button()->bulky($grid_icon, $this->lang->txt(
'tools'),
"#")->withEngagedState(
true);
144 $main_bar = $main_bar->withToolsButton($tools_button);
148 foreach ($this->gs->collector()->tool()->getItemsForUIRepresentation() as $tool) {
153 $component = $tool->getTypeInformation()->getRenderer()->getComponentForItem($tool,
false);
155 $identifier = $this->
hash($tool->getProviderIdentification()->serialize());
156 $close_button = null;
157 if ($tool->hasCloseCallback()) {
158 $close_button = $this->
ui->factory()->button()->close()->withOnLoadCode(
static function (
string $id) use ($identifier) {
160 return "$('#$id').on('click', function(){ 162 url: 'src/GlobalScreen/Client/callback_handler.php?$key_item=$identifier' 164 console.log('done closing'); 169 $main_bar = $main_bar->withAdditionalToolEntry($identifier, $component, $tool->isInitiallyHidden(), $close_button);
185 $f = $this->
ui->factory();
187 foreach ($DIC[
'ilLocator']->getItems() as $item) {
188 if (empty($item[
'title']) || empty($item[
'link'])) {
191 $crumbs[] =
$f->link()->standard($item[
'title'], $item[
"link"]);
194 return $f->breadcrumbs($crumbs);
204 return $this->
ui->factory()->image()
205 ->standard($std_logo, $this->lang->txt(
'rep_main_page'))
216 return $this->
ui->factory()->image()
217 ->standard($responsive_logo, $this->lang->txt(
'rep_main_page'))
223 $std_logo_link = ilUserUtil::getStartingPointAsUrl();
224 if (!$std_logo_link) {
225 $std_logo_link =
"./goto.php?target=root_1";
227 return $std_logo_link;
237 foreach ($this->gs->collector()->notifications()->getAdministrativeNotifications() as $adn) {
238 $system_infos[] = $adn->getRenderer($this->
ui->factory())->getNotificationComponentForItem($adn);
241 return $system_infos;
249 return $this->
ui->factory()->mainControls()->footer([]);
Class StandardPagePartProvider.
This describes the MainBar.
Interface PagePartProvider.
trait SlateSessionStateCode
Class.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
This describes the MetaBar.
This describes the Footer.