19declare(strict_types=1);
75 return $this->context_collection->
main();
80 return $this->
globalScreen()->layout()->factory()->content()->withModification(
function (
83 $ui = $this->dic->ui();
84 return $ui->factory()->
legacy()->content(
85 $ui->renderer()->render(
$content) . self::$content
87 })->withLowPriority();
93 $modification = $this->
globalScreen()->layout()->factory()->title()->withModification(
94 fn(?
string $content): ?
string => self::$title
103 $modification = $this->
globalScreen()->layout()->factory()->short_title()->withModification(
104 fn(?
string $content): ?
string => self::$short_title
105 )->withLowPriority();
107 return $modification;
113 $modification = $this->
globalScreen()->layout()->factory()->view_title()->withModification(
115 )->withLowPriority();
117 return $modification;
130 $tab_title_generator =
function (array $tab):
string {
131 $tab_title = ($tab[
'dir_text'] ??
false) ===
false ? $this->dic->language()->txt($tab[
'text']) : $tab[
'text'] ??
'';
132 return $tab_title .
': ';
137 $tab_looper =
static function (array $tabs,
string $active_tab) use ($tab_title_generator):
string {
139 foreach ($tabs as $tab) {
140 if ($tab[
'id'] === $active_tab) {
141 $tab_title = $tab_title_generator($tab);
149 $tabs = $this->dic->tabs()->target;
150 $active_tab = $this->dic->tabs()->getActiveTab();
151 if ($active_tab ===
'' && isset($tabs[0])) {
152 $active_tab = $tabs[0][
'id'];
155 $tab_title = $tab_looper($tabs, $active_tab);
159 $subtabs = $this->dic->tabs()->sub_target;
160 if (count($subtabs) > 1) {
161 $active_subtab = array_values(
162 array_filter($subtabs,
static fn(array $subtab):
bool => $subtab[
'activate'] ??
false)
165 if ($active_subtab ===
'' && isset($subtabs[0])) {
166 $active_subtab = $subtabs[0][
'id'];
168 $subtab_title = $tab_looper($subtabs, $active_subtab);
171 return $subtab_title . $tab_title;
The scope of this class is split ilias-conform URI's into components.
Class ContentModification.
Class ShortTitleModification.
Class ShortTitleModification.
Class AbstractModificationProvider.
getTitleModification(CalledContexts $screen_context_stack)
@inheritDoc
getViewTitleModification(CalledContexts $screen_context_stack)
@inheritDoc
getShortTitleModification(CalledContexts $screen_context_stack)
@inheritDoc
static string $perma_link
static string $view_title
static setTitle(string $title)
static setPermaLink(string $perma_link)
static setContent(string $content)
static setViewTitle(string $view_title)
buildTabTitle()
@description This method was introduced due to A11y problems, see https://mantis.ilias....
getContentModification(CalledContexts $screen_context_stack)
@inheritDoc
static string $short_title
static setShortTitle(string $short_title)