From 055f611735fdc26e4a9a7fe3ee19cb43357531f2 Mon Sep 17 00:00:00 2001 From: Nils Haagen Date: Wed, 20 Nov 2024 16:04:38 +0100 Subject: [PATCH] UI/Legacy: rename LegacyContent to Content --- .../class.ilAccessibilityNullCriterion.php | 2 +- ...cessibilityUserHasLanguageCriterionGUI.php | 4 +- .../class.ilAccessibilityDocumentTableGUI.php | 2 +- .../classes/AdministrationMainBarProvider.php | 2 +- .../classes/class.ilAdminGSToolProvider.php | 2 +- .../classes/class.ilObjAuthSettingsGUI.php | 2 +- .../class.ilAwarenessMetaBarProvider.php | 2 +- .../classes/class.ilBTPopOverGUI.php | 12 +++--- .../GlobalScreen/BadgeMainBarProvider.php | 2 +- .../ILIAS/Badge/classes/BadgeParent.php | 4 +- .../ILIAS/Badge/tests/BadgeParentTest.php | 10 ++--- .../ILIAS/Block/classes/class.ilBlockGUI.php | 8 ++-- .../ILIAS/Blog/classes/class.ilObjBlogGUI.php | 2 +- .../class.ObjectSelectionListGUI.php | 2 +- .../BookingProcess/class.SlotGUI.php | 2 +- components/ILIAS/COPage/Editor/UI/Init.php | 2 +- .../class.ilCOPageEditGSToolProvider.php | 2 +- .../IntLink/class.ilInternalLinkGUI.php | 2 +- .../PC/InteractiveImage/IIMEditorInit.php | 2 +- .../InteractiveImageQueryActionHandler.php | 2 +- .../class.ilPCInteractiveImage.php | 2 +- .../PC/MediaObject/class.ilPCMediaObject.php | 2 +- .../COPage/PC/Tabs/class.ilPCTabsGUI.php | 2 +- .../COPage/classes/class.ilPageObjectGUI.php | 2 +- .../Provider/CalendarMainBarProvider.php | 2 +- .../classes/class.ilCalendarBlockGUI.php | 2 +- .../class.ilCalendarSubscriptionGUI.php | 2 +- .../classes/class.ilCalendarViewGUI.php | 2 +- .../classes/Provider/ChatMainBarProvider.php | 2 +- .../classes/gui/class.ilChatroomViewGUI.php | 2 +- .../class.ilCmiXapiStatementsTableGUI.php | 2 +- .../Provider/ContactMainBarProvider.php | 2 +- .../Contact/classes/class.ilContactGUI.php | 2 +- .../class.ilContentPageKioskModeView.php | 2 +- .../class.ilTutorialSupportBlockGUI.php | 2 +- .../classes/class.ilDashboardBlockGUI.php | 6 +-- .../classes/class.ilMembershipBlockGUI.php | 2 +- .../classes/class.ilSelectedItemsBlockGUI.php | 4 +- .../Provider/MyStaffListEntryProvider.php | 2 +- .../Exercise/Assignment/PanelBuilderUI.php | 4 +- .../class.ilExerciseGSToolProvider.php | 2 +- .../class.ilExSubmissionObjectGUI.php | 2 +- .../classes/class.ilExerciseManagementGUI.php | 10 ++--- .../classes/class.ilObjExerciseGUI.php | 2 +- .../Export/Print/class.PrintProcessGUI.php | 2 +- .../classes/class.ilFileKioskModeView.php | 2 +- .../classes/class.ilObjFileUploadDropzone.php | 2 +- .../ForumGlobalScreenToolsProvider.php | 2 +- .../Forum/classes/class.ilObjForumGUI.php | 6 +-- .../Layout/Factory/ContentModification.php | 6 +-- .../src/Scope/Layout/ModificationHandler.php | 4 +- .../PagePart/DecoratedPagePartProvider.php | 8 ++-- .../Provider/PagePart/PagePartProvider.php | 6 +-- .../PagePart/StandardPagePartProvider.php | 6 +-- .../Collector/Renderer/BaseTypeRenderer.php | 4 +- .../Renderer/ComplexItemRenderer.php | 2 +- .../MainMenu/Factory/AbstractBaseItem.php | 10 ++--- .../src/Scope/MainMenu/Factory/Item/Lost.php | 2 +- .../src/Scope/MainMenu/Factory/isItem.php | 6 +-- .../Renderer/BaseMetaBarItemRenderer.php | 2 +- .../Scope/MetaBar/Factory/TopLegacyItem.php | 8 ++-- .../Renderer/StandardToastRenderer.php | 2 +- .../Renderer/TreeToolItemRenderer.php | 2 +- .../GlobalScreen/src/Scope/Tool/README.md | 2 +- .../class.ilGlossaryFlashcardBoxGUI.php | 2 +- .../class.ilPresentationTableGUI.php | 2 +- .../class.ilGroupAddToGroupActionGUI.php | 4 +- .../classes/class.ilHelpGSToolProvider.php | 2 +- .../class.ilObjectTranslationGUI.php | 4 +- .../ILIASObject/classes/class.ilObjectGUI.php | 2 +- .../classes/class.ilObjectListGUI.php | 2 +- .../classes/class.ilLMEditGSToolProvider.php | 2 +- .../classes/class.ilLMGSToolProvider.php | 4 +- .../class.ilLMPresentationGUI.php | 4 +- .../classes/class.ilLMMenuGUI.php | 4 +- .../class.ilLearningModuleKioskModeView.php | 2 +- .../class.ilLSViewLayoutProvider.php | 6 +-- .../Player/class.ilKioskPageRenderer.php | 2 +- .../class.ilObjLearningSequenceLearnerGUI.php | 12 +++--- .../LegalDocuments/classes/Condition/Role.php | 2 +- .../classes/Condition/UserCountry.php | 2 +- .../classes/Condition/UserLanguage.php | 2 +- .../ConsumerSlots/Agreement.php | 2 +- .../ConsumerSlots/ModifyFooter.php | 4 +- .../ConsumerSlots/ShowOnLoginPage.php | 2 +- .../ConsumerSlots/WithdrawProcess.php | 2 +- .../classes/DefaultMappings.php | 2 +- .../classes/Provide/ProvideDocument.php | 2 +- .../classes/Provide/ProvideHistory.php | 2 +- .../tests/Condition/RoleTest.php | 4 +- .../tests/Condition/UserCountryTest.php | 4 +- .../tests/Condition/UserLanguageTest.php | 4 +- .../LegalDocuments/tests/ConductorTest.php | 4 +- .../ConsumerSlots/ShowOnLoginPageTest.php | 4 +- .../tests/DefaultMappingsTest.php | 4 +- .../tests/Provide/ProvideDocumentTest.php | 8 ++-- .../tests/Provide/ProvideHistoryTest.php | 4 +- .../ILIAS/Like/classes/class.ilLikeGUI.php | 2 +- .../Provider/MailGlobalScreenToolProvider.php | 6 +-- .../classes/Provider/MailMainBarProvider.php | 2 +- .../Provider/StandardTopItemsProvider.php | 2 +- .../class.ilMediaPoolGSToolProvider.php | 2 +- .../classes/class.ilObjMediaPoolGUI.php | 2 +- .../classes/Copyright/NullRenderer.php | 4 +- .../MetaData/classes/Copyright/Renderer.php | 8 ++-- .../classes/Copyright/RendererInterface.php | 4 +- .../Services/CopyrightHelper/Copyright.php | 4 +- .../CopyrightHelper/CopyrightInterface.php | 4 +- .../CopyrightHelper/NullCopyright.php | 4 +- .../MetaData/tests/Copyright/RendererTest.php | 14 +++---- .../CopyrightHelper/CopyrightTest.php | 8 ++-- .../classes/Provider/StaffMainBarProvider.php | 8 ++-- .../classes/Provider/NewsMainBarProvider.php | 2 +- .../class.ilNewsForContextBlockGUI.php | 4 +- .../News/classes/class.ilNewsTimelineGUI.php | 4 +- .../News/classes/class.ilPDNewsBlockGUI.php | 2 +- .../classes/NotesMainBarProvider.php | 4 +- .../Service/class.InternalGUIService.php | 2 +- .../classes/Provider/OnScreenChatProvider.php | 2 +- .../classes/class.ilOnScreenChatGUI.php | 2 +- .../class.ilOrgUnitAuthorityFormGUI.php | 2 +- .../Provider/OrgUnitMainBarProvider.php | 6 +-- .../class.WorkspaceMainBarProvider.php | 2 +- .../class.ilWorkspaceGSToolProvider.php | 2 +- .../Exercise/class.ilPortfolioExerciseGUI.php | 2 +- .../Provider/PortfolioMainBarProvider.php | 2 +- .../classes/RepositoryMainBarProvider.php | 10 ++--- .../Service/Modal/class.ModalAdapterGUI.php | 6 +-- .../Provider/SearchMetaBarProvider.php | 2 +- components/ILIAS/Setup/src/Metrics/Metric.php | 2 +- .../ILIAS/Setup/tests/Metrics/MetricTest.php | 4 +- .../Provider/SkillMainBarProvider.php | 2 +- .../classes/class.ilSkillGSToolProvider.php | 10 ++--- .../Personal/class.ilPersonalSkillsGUI.php | 2 +- ...s.ilObjStudyProgrammeAutoCategoriesGUI.php | 4 +- ....ilObjStudyProgrammeAutoMembershipsGUI.php | 6 +-- .../class.ilKSDocumentationEntryGUI.php | 4 +- .../SystemStylesGlobalScreenToolProvider.php | 2 +- .../class.ilSurveyEvaluationGUI.php | 6 +-- .../Survey/Mode/class.AbstractUIModifier.php | 6 +-- .../classes/TaggingMainBarProvider.php | 2 +- .../Tagging/classes/class.ilTaggingGUI.php | 2 +- .../class.ilTaxonomyGSToolProvider.php | 4 +- .../ILIAS/Test/classes/class.ilObjTestGUI.php | 2 +- .../classes/class.ilTestEvaluationGUI.php | 2 +- .../Test/classes/class.ilTestToplistGUI.php | 2 +- .../ILIAS/Test/src/Logging/TestError.php | 6 +-- .../Test/src/Logging/TestUserInteraction.php | 4 +- .../src/Presentation/class.TestScreenGUI.php | 2 +- .../ILIAS/Test/src/Results/Data/Factory.php | 4 +- .../classes/class.ilBulkEditQuestionsGUI.php | 2 +- .../classes/class.ilObjQuestionPoolGUI.php | 4 +- .../classes/Provider/LPMainBarProvider.php | 2 +- .../class.ilLearningProgressBaseGUI.php | 2 +- .../class.ilLPListOfSettingsGUI.php | 2 +- components/ILIAS/UI/README.md | 4 +- .../ILIAS/UI/src/Component/Entity/Entity.php | 14 +++---- .../UI/src/Component/Item/Notification.php | 6 +-- .../ILIAS/UI/src/Component/Legacy/Factory.php | 4 +- .../UI/src/Component/Legacy/LegacyContent.php | 2 +- .../UI/src/Component/Listing/Property.php | 4 +- .../Component/MainControls/Slate/Factory.php | 4 +- .../src/Component/Panel/Secondary/Factory.php | 4 +- .../src/Component/Panel/Secondary/Legacy.php | 2 +- .../Component/Entity/Entity.php | 38 +++++++++---------- .../Input/Field/FilterContextRenderer.php | 4 +- .../Component/Item/Notification.php | 8 ++-- .../Component/Legacy/Factory.php | 4 +- .../Component/Legacy/LegacyContent.php | 4 +- .../Component/Legacy/Renderer.php | 4 +- .../Component/Listing/Property.php | 6 +-- .../Component/MainControls/Slate/Factory.php | 2 +- .../Component/MainControls/Slate/Legacy.php | 2 +- .../Component/Modal/LightboxTextPage.php | 6 +-- .../Component/Panel/Secondary/Factory.php | 2 +- .../Component/Panel/Secondary/Legacy.php | 6 +-- .../UI/src/examples/Button/Close/modal.php | 2 +- .../UI/src/examples/Divider/Vertical/base.php | 4 +- .../UI/src/examples/Entity/Standard/base.php | 2 +- .../Entity/Standard/semantic_groups.php | 12 +++--- .../Container/ViewControl/Standard/base.php | 2 +- .../Input/ViewControl/FieldSelection/base.php | 2 +- .../examples/Input/ViewControl/Group/base.php | 2 +- .../Input/ViewControl/NullControl/base.php | 2 +- .../Input/ViewControl/Pagination/base.php | 2 +- .../ViewControl/Pagination/with_one_page.php | 2 +- .../Input/ViewControl/Sortation/base.php | 2 +- .../DynamicallyDistributed/base.php | 6 +-- .../DynamicallyDistributed/nested.php | 12 +++--- .../Horizontal/EvenlyDistributed/base.php | 6 +-- .../Horizontal/EvenlyDistributed/nested.php | 12 +++--- .../Layout/Alignment/Vertical/base.php | 6 +-- .../Layout/Alignment/Vertical/nested.php | 10 ++--- .../src/examples/Layout/Page/Standard/ui.php | 16 ++++---- .../Layout/Page/Standard/ui_mainbar.php | 24 ++++++------ .../{LegacyContent => Content}/base.php | 4 +- .../inside_panel.php | 4 +- .../examples/MainControls/MainBar/mainbar.php | 2 +- .../MainControls/MetaBar/base_metabar.php | 6 +-- .../extended_example_for_developers.php | 2 +- .../MainControls/ModeInfo/modeinfo.php | 6 +-- .../MainControls/Slate/Combined/combined.php | 2 +- .../MainControls/Slate/Legacy/legacy.php | 2 +- .../Slate/Notification/standard.php | 2 +- ...w_modal_on_button_click_async_rendered.php | 2 +- .../Modal/RoundTrip/show_multi_step_modal.php | 6 +-- ..._the_same_modal_with_different_buttons.php | 2 +- .../UI/src/examples/Panel/Report/base.php | 6 +-- .../Panel/Report/with_view_controls.php | 6 +-- .../examples/Panel/Secondary/Legacy/base.php | 2 +- .../Legacy/with_all_view_controls.php | 2 +- .../Panel/Secondary/Legacy/with_footer.php | 2 +- .../Panel/Standard/base_text_block.php | 2 +- .../examples/Panel/Standard/with_actions.php | 2 +- .../ILIAS/UI/src/examples/Panel/Sub/base.php | 2 +- .../src/examples/Panel/Sub/with_actions.php | 2 +- .../UI/src/examples/Panel/Sub/with_card.php | 4 +- .../Panel/Sub/with_secondary_panel.php | 2 +- .../Popover/Standard/show_card_in_popover.php | 2 +- ...show_popover_with_async_loaded_content.php | 4 +- .../show_popover_with_different_positions.php | 6 +-- ..._popover_with_dynamic_changing_content.php | 4 +- .../show_popover_with_vertical_scrollbars.php | 2 +- .../src/examples/Prompt/State/Show/base.php | 2 +- .../UI/src/examples/Table/Ordering/base.php | 2 +- .../UI/tests/Component/Card/CardTest.php | 4 +- .../Component/Dropzone/File/WrapperTest.php | 4 +- .../UI/tests/Component/Entity/EntityTest.php | 6 +-- .../Container/Filter/FilterInputTest.php | 4 +- .../Container/Filter/StandardFilterTest.php | 4 +- .../Component/Item/ItemNotificationTest.php | 4 +- .../Layout/Alignment/AlignmentTest.php | 16 ++++---- .../Layout/Page/StandardPageTest.php | 4 +- .../UI/tests/Component/Legacy/LegacyTest.php | 18 ++++----- .../Component/MainControls/MainBarTest.php | 2 +- .../Menu/Drilldown/DrilldownTest.php | 4 +- .../tests/Component/Modal/RoundTripTest.php | 2 +- .../Panel/PanelSecondaryLegacyTest.php | 30 +++++++-------- .../UI/tests/Component/Panel/PanelTest.php | 4 +- .../tests/Component/Popover/PopoverTest.php | 4 +- .../ILIAS/UI/tests/UITestHelperTest.php | 2 +- .../class.ilExplorerSelectInputGUI.php | 2 +- .../classes/Screen/PageContentProvider.php | 8 ++-- .../Gallery/class.ilUsersGalleryGUI.php | 2 +- .../class.ilUserPrivacySettingsGUI.php | 2 +- .../EmbeddedApplicationPagePartProvider.php | 4 +- .../ILIAS/WOPI/classes/Embed/Renderer.php | 2 +- .../class.ilWebDAVMountInstructionsGUI.php | 10 ++--- .../WebServices/ECS/test/ilECSUserTest.php | 2 +- .../classes/class.ilWorkspaceContentGUI.php | 2 +- 250 files changed, 522 insertions(+), 522 deletions(-) rename components/ILIAS/UI/src/examples/Legacy/{LegacyContent => Content}/base.php (82%) rename components/ILIAS/UI/src/examples/Legacy/{LegacyContent => Content}/inside_panel.php (81%) diff --git a/components/ILIAS/Accessibility/classes/Criteria/class.ilAccessibilityNullCriterion.php b/components/ILIAS/Accessibility/classes/Criteria/class.ilAccessibilityNullCriterion.php index 8ddfc497f096..5f252acc0b8d 100755 --- a/components/ILIAS/Accessibility/classes/Criteria/class.ilAccessibilityNullCriterion.php +++ b/components/ILIAS/Accessibility/classes/Criteria/class.ilAccessibilityNullCriterion.php @@ -67,7 +67,7 @@ public function getValuePresentation( ilAccessibilityCriterionConfig $config, Factory $uiFactory ): Component { - return $uifactory->legacy()->legacyContent('-'); + return $uifactory->legacy()->content('-'); } public function getSelection(ilAccessibilityCriterionConfig $config): ilSelectInputGUI diff --git a/components/ILIAS/Accessibility/classes/Criteria/class.ilAccessibilityUserHasLanguageCriterionGUI.php b/components/ILIAS/Accessibility/classes/Criteria/class.ilAccessibilityUserHasLanguageCriterionGUI.php index 1f7250625cfb..8ccf6271b786 100755 --- a/components/ILIAS/Accessibility/classes/Criteria/class.ilAccessibilityUserHasLanguageCriterionGUI.php +++ b/components/ILIAS/Accessibility/classes/Criteria/class.ilAccessibilityUserHasLanguageCriterionGUI.php @@ -100,9 +100,9 @@ public function getValuePresentation(ilAccessibilityCriterionConfig $config, Fac $lng = $config['lng'] ?? ''; if (!is_string($lng) || 2 !== strlen($lng)) { - return $uifactory->legacy()->legacyContent(''); + return $uifactory->legacy()->content(''); } - return $uifactory->legacy()->legacyContent($this->lng->txt('meta_l_' . $lng)); + return $uifactory->legacy()->content($this->lng->txt('meta_l_' . $lng)); } } diff --git a/components/ILIAS/Accessibility/classes/Document/class.ilAccessibilityDocumentTableGUI.php b/components/ILIAS/Accessibility/classes/Document/class.ilAccessibilityDocumentTableGUI.php index fd7ef74542a6..7ff9d93e6c9e 100755 --- a/components/ILIAS/Accessibility/classes/Document/class.ilAccessibilityDocumentTableGUI.php +++ b/components/ILIAS/Accessibility/classes/Document/class.ilAccessibilityDocumentTableGUI.php @@ -283,7 +283,7 @@ protected function formatCriterionAssignments(string $column, array $row): strin $typeGui->getIdentPresentation(), ($this->isEditable ? $this->uiRenderer->render($dropDown) : '') ])] = - $this->uiFactory->legacy()->legacyContent( + $this->uiFactory->legacy()->content( $this->uiRenderer->render( $typeGui->getValuePresentation( $criterion->getCriterionValue(), diff --git a/components/ILIAS/Administration/GlobalScreen/classes/AdministrationMainBarProvider.php b/components/ILIAS/Administration/GlobalScreen/classes/AdministrationMainBarProvider.php index 4e63ad2d1903..6f1d179185ae 100755 --- a/components/ILIAS/Administration/GlobalScreen/classes/AdministrationMainBarProvider.php +++ b/components/ILIAS/Administration/GlobalScreen/classes/AdministrationMainBarProvider.php @@ -101,7 +101,7 @@ public function getStaticSubItems(): array ->withParent($top) ->withPosition($position * 10) ->withAlwaysAvailable(true) - ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->legacyContent("{$this->dic->language()->txt('item_must_be_always_active')}")) + ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->content("{$this->dic->language()->txt('item_must_be_always_active')}")) ->withVisibilityCallable( $access_helper->hasAdministrationAccess() )->withAvailableCallable( diff --git a/components/ILIAS/Administration/GlobalScreen/classes/class.ilAdminGSToolProvider.php b/components/ILIAS/Administration/GlobalScreen/classes/class.ilAdminGSToolProvider.php index 7fd022acc8f7..34bf036ce61e 100755 --- a/components/ILIAS/Administration/GlobalScreen/classes/class.ilAdminGSToolProvider.php +++ b/components/ILIAS/Administration/GlobalScreen/classes/class.ilAdminGSToolProvider.php @@ -45,7 +45,7 @@ public function getToolsForContextStack(CalledContexts $called_contexts): array return $this->identification_provider->contextAwareIdentifier($id, true); }; $l = function (string $content) { - return $this->dic->ui()->factory()->legacy()->legacyContent($content); + return $this->dic->ui()->factory()->legacy()->content($content); }; $tools[] = $this->factory->tool($iff("tree")) ->withTitle("Tree") diff --git a/components/ILIAS/Authentication/classes/class.ilObjAuthSettingsGUI.php b/components/ILIAS/Authentication/classes/class.ilObjAuthSettingsGUI.php index 7e7406e3aece..864cb5690ac4 100755 --- a/components/ILIAS/Authentication/classes/class.ilObjAuthSettingsGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilObjAuthSettingsGUI.php @@ -484,7 +484,7 @@ public function testSoapAuthConnectionObject(): void $test_form = $test_form->withRequest($this->request); $result = $test_form->getData(); if (!is_null($result)) { - $panel_content[] = $this->ui->legacy()->legacyContent( + $panel_content[] = $this->ui->legacy()->content( ilSOAPAuth::testConnection($result["ext_uid"], $result["soap_pw"], $result["new_user"]) ); } diff --git a/components/ILIAS/Awareness/GlobalScreen/classes/class.ilAwarenessMetaBarProvider.php b/components/ILIAS/Awareness/GlobalScreen/classes/class.ilAwarenessMetaBarProvider.php index 6f5553cf9500..c65a388728c6 100755 --- a/components/ILIAS/Awareness/GlobalScreen/classes/class.ilAwarenessMetaBarProvider.php +++ b/components/ILIAS/Awareness/GlobalScreen/classes/class.ilAwarenessMetaBarProvider.php @@ -70,7 +70,7 @@ public function getMetaBarItems(): array $result = $gui->getAwarenessList(true); $online = explode(":", $result["cnt"]); $online = (int) $online[0]; - $content = $this->dic->ui()->factory()->legacy()->legacyContent($result["html"]); + $content = $this->dic->ui()->factory()->legacy()->content($result["html"]); if ($online === 0) { $is_widget_visible = false; } diff --git a/components/ILIAS/BackgroundTasks_/classes/class.ilBTPopOverGUI.php b/components/ILIAS/BackgroundTasks_/classes/class.ilBTPopOverGUI.php index 4e287f2fb334..714e9559a40d 100755 --- a/components/ILIAS/BackgroundTasks_/classes/class.ilBTPopOverGUI.php +++ b/components/ILIAS/BackgroundTasks_/classes/class.ilBTPopOverGUI.php @@ -23,7 +23,7 @@ use ILIAS\BackgroundTasks\Task\UserInteraction; use ILIAS\UI\Component\Button\Button; use ILIAS\UI\Component\Button\Shy; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; /** * Class ilBTPopOverGUI @@ -140,14 +140,14 @@ public function getItemForObserver(Bucket $observer): ILIAS\UI\Component\Item\No } - private function getDefaultCardContent(Bucket $observer): LegacyContent + private function getDefaultCardContent(Bucket $observer): Content { return $this->getProgressbar($observer); } /** - * @return \ILIAS\UI\Component\Legacy\LegacyContent[]|\ILIAS\UI\Component\Button\Shy[] + * @return \ILIAS\UI\Component\Legacy\Content[]|\ILIAS\UI\Component\Button\Shy[] */ public function getUserInteractionContent(Bucket $observer, string $redirect_uri): array { @@ -157,7 +157,7 @@ public function getUserInteractionContent(Bucket $observer, string $redirect_uri $ctrl = $this->dic->ctrl(); if (!$observer->getCurrentTask() instanceof UserInteraction) { - return [$factory->legacy()->legacyContent('')]; + return [$factory->legacy()->content('')]; } /** @var UserInteraction $userInteraction */ $userInteraction = $observer->getCurrentTask(); @@ -193,7 +193,7 @@ function (UserInteraction\Option $option) use ($ctrl, $factory, $observer, $pers } - private function getProgressbar(Bucket $observer): LegacyContent + private function getProgressbar(Bucket $observer): Content { $percentage = $observer->getOverallPercentage(); @@ -212,7 +212,7 @@ private function getProgressbar(Bucket $observer): LegacyContent break; } - return $this->dic->ui()->factory()->legacy()->legacyContent("
+ return $this->dic->ui()->factory()->legacy()->content("
{$content} diff --git a/components/ILIAS/Badge/GlobalScreen/BadgeMainBarProvider.php b/components/ILIAS/Badge/GlobalScreen/BadgeMainBarProvider.php index 55ea7cb14a14..25f28d5b82dc 100755 --- a/components/ILIAS/Badge/GlobalScreen/BadgeMainBarProvider.php +++ b/components/ILIAS/Badge/GlobalScreen/BadgeMainBarProvider.php @@ -44,7 +44,7 @@ public function getStaticSubItems(): array ->withPosition(40) ->withParent(StandardTopItemsProvider::getInstance()->getAchievementsIdentification()) ->withSymbol($icon) - ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->legacyContent($this->dic->language()->txt('component_not_active'))) + ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->content($this->dic->language()->txt('component_not_active'))) ->withAvailableCallable( function () { return ilBadgeHandler::getInstance()->isActive(); diff --git a/components/ILIAS/Badge/classes/BadgeParent.php b/components/ILIAS/Badge/classes/BadgeParent.php index 9db97aef219f..1a0677a23ca3 100755 --- a/components/ILIAS/Badge/classes/BadgeParent.php +++ b/components/ILIAS/Badge/classes/BadgeParent.php @@ -72,11 +72,11 @@ public function asComponent(ilBadge $badge): ?Component ->link() ->standard($meta_data['title'], ($this->link_to)($parent_ref_id)); } else { - $parent_link = $this->container->ui()->factory()->legacy()->legacyContent($meta_data['title']); + $parent_link = $this->container->ui()->factory()->legacy()->content($meta_data['title']); } return $this->container->ui()->factory()->listing()->descriptive([ - $this->container->language()->txt('object') => $this->container->ui()->factory()->legacy()->legacyContent( + $this->container->language()->txt('object') => $this->container->ui()->factory()->legacy()->content( $this->container->ui()->renderer()->render([$parent_icon, $parent_link]) ) ]); diff --git a/components/ILIAS/Badge/tests/BadgeParentTest.php b/components/ILIAS/Badge/tests/BadgeParentTest.php index 6c98968b7f58..5c30f2b2141a 100755 --- a/components/ILIAS/Badge/tests/BadgeParentTest.php +++ b/components/ILIAS/Badge/tests/BadgeParentTest.php @@ -54,7 +54,7 @@ public function testShowWithParentReadRight(): void $descriptive = $this->getMockBuilder(Descriptive::class)->getMock(); $factory = $this->getMockBuilder(UI::class)->disableOriginalConstructor()->getMock(); $language = $this->getMockBuilder(ilLanguage::class)->disableOriginalConstructor()->getMock(); - $legacy = $this->getMockBuilder(Legacy\LegacyContent::class)->disableOriginalConstructor()->getMock(); + $legacy = $this->getMockBuilder(Legacy\Content::class)->disableOriginalConstructor()->getMock(); $legacy_factory = $this->getMockBuilder(Legacy\Factory::class)->disableOriginalConstructor()->getMock(); $link = $this->getMockBuilder(Link::class)->disableOriginalConstructor()->getMock(); $listing = $this->getMockBuilder(Listing::class)->disableOriginalConstructor()->getMock(); @@ -72,7 +72,7 @@ public function testShowWithParentReadRight(): void $factory->method('listing')->willReturn($listing); $factory->method('link')->willReturn($link); - $legacy_factory->expects(self::once())->method('legacyContent')->with($rendered)->willReturn($legacy); + $legacy_factory->expects(self::once())->method('content')->with($rendered)->willReturn($legacy); $factory->expects(self::once())->method('legacy')->willReturn($legacy_factory); $renderer->expects(self::once())->method('render')->willReturn($rendered); @@ -120,10 +120,10 @@ public function testShowWithoutParentReadRight(): void $descriptive = $this->getMockBuilder(Descriptive::class)->getMock(); $factory = $this->getMockBuilder(UI::class)->disableOriginalConstructor()->getMock(); $language = $this->getMockBuilder(ilLanguage::class)->disableOriginalConstructor()->getMock(); - $legacy = $this->getMockBuilder(Legacy\LegacyContent::class)->disableOriginalConstructor()->getMock(); + $legacy = $this->getMockBuilder(Legacy\Content::class)->disableOriginalConstructor()->getMock(); $legacy_factory = $this->getMockBuilder(Legacy\Factory::class)->disableOriginalConstructor()->getMock(); $listing = $this->getMockBuilder(Listing::class)->disableOriginalConstructor()->getMock(); - $parent_link = $this->getMockBuilder(LegacyContent::class)->disableOriginalConstructor()->getMock(); + $parent_link = $this->getMockBuilder(Content::class)->disableOriginalConstructor()->getMock(); $renderer = $this->getMockBuilder(Renderer::class)->disableOriginalConstructor()->getMock(); $ui = $this->getMockBuilder(UIServices::class)->disableOriginalConstructor()->getMock(); @@ -134,7 +134,7 @@ public function testShowWithoutParentReadRight(): void ])->willReturn($descriptive); $factory->method('listing')->willReturn($listing); - $legacy_factory->method('legacyContent')->willReturn($legacy); + $legacy_factory->method('content')->willReturn($legacy); $factory->method('legacy')->willReturn($legacy_factory); $renderer->expects(self::once())->method('render')->willReturn($rendered); diff --git a/components/ILIAS/Block/classes/class.ilBlockGUI.php b/components/ILIAS/Block/classes/class.ilBlockGUI.php index 617a2539a363..26ca84688f2b 100755 --- a/components/ILIAS/Block/classes/class.ilBlockGUI.php +++ b/components/ILIAS/Block/classes/class.ilBlockGUI.php @@ -394,14 +394,14 @@ public function getHTML(): string case self::PRES_SEC_LEG: $panel = $this->factory->panel()->secondary()->legacy( $this->specialCharsAsEntities($this->getTitle()), - $this->factory->legacy()->legacyContent($this->getLegacyContent()) + $this->factory->legacy()->content($this->getLegacyContent()) ); break; case self::PRES_MAIN_LEG: $panel = $this->factory->panel()->standard( $this->specialCharsAsEntities($this->getTitle()), - $this->factory->legacy()->legacyContent($this->getLegacyContent()) + $this->factory->legacy()->content($this->getLegacyContent()) ); break; @@ -429,12 +429,12 @@ public function getHTML(): string if ($this->getPresentation() === self::PRES_SEC_LIST) { $panel = $this->factory->panel()->secondary()->legacy( $this->specialCharsAsEntities($this->getTitle()), - $this->factory->legacy()->legacyContent($this->getNoItemFoundContent()) + $this->factory->legacy()->content($this->getNoItemFoundContent()) ); } else { $panel = $this->factory->panel()->standard( $this->specialCharsAsEntities($this->getTitle()), - $this->factory->legacy()->legacyContent($this->getNoItemFoundContent()) + $this->factory->legacy()->content($this->getNoItemFoundContent()) ); } } diff --git a/components/ILIAS/Blog/classes/class.ilObjBlogGUI.php b/components/ILIAS/Blog/classes/class.ilObjBlogGUI.php index cf984b49081a..b508580c5f49 100755 --- a/components/ILIAS/Blog/classes/class.ilObjBlogGUI.php +++ b/components/ILIAS/Blog/classes/class.ilObjBlogGUI.php @@ -1787,7 +1787,7 @@ public function renderNavigation( $content = $block[1]; - $secondary_panel = $ui_factory->panel()->secondary()->legacy($title, $ui_factory->legacy()->legacyContent($content)); + $secondary_panel = $ui_factory->panel()->secondary()->legacy($title, $ui_factory->legacy()->content($content)); if (isset($block[2]) && is_array($block[2])) { $link = $ui_factory->button()->shy($block[2][1], $block[2][0]); diff --git a/components/ILIAS/BookingManager/BookingProcess/class.ObjectSelectionListGUI.php b/components/ILIAS/BookingManager/BookingProcess/class.ObjectSelectionListGUI.php index b5eb4c5e61fa..d9e82f6934fb 100755 --- a/components/ILIAS/BookingManager/BookingProcess/class.ObjectSelectionListGUI.php +++ b/components/ILIAS/BookingManager/BookingProcess/class.ObjectSelectionListGUI.php @@ -78,7 +78,7 @@ public function render(): string $p = $this->ui->factory()->panel()->secondary()->legacy( $this->lng->txt("book_object_selection"), - $this->ui->factory()->legacy()->legacyContent($tpl->get()) + $this->ui->factory()->legacy()->content($tpl->get()) ); return $this->ui->renderer()->render($p); } diff --git a/components/ILIAS/BookingManager/BookingProcess/class.SlotGUI.php b/components/ILIAS/BookingManager/BookingProcess/class.SlotGUI.php index 636be0772743..ba5bb4e6738c 100755 --- a/components/ILIAS/BookingManager/BookingProcess/class.SlotGUI.php +++ b/components/ILIAS/BookingManager/BookingProcess/class.SlotGUI.php @@ -62,7 +62,7 @@ public function render(): string $ui = $DIC->ui(); $tpl = new \ilTemplate("tpl.slot.html", true, true, "components/ILIAS/BookingManager/BookingProcess"); - $modal = $ui->factory()->modal()->roundtrip("", $ui->factory()->legacy()->legacyContent("")); + $modal = $ui->factory()->modal()->roundtrip("", $ui->factory()->legacy()->content("")); $url = $this->link . '&replaceSignal=' . $modal->getReplaceSignal()->getId(); $modal = $modal->withAsyncRenderUrl($url); $button = $ui->factory()->button()->shy($this->title, "#") diff --git a/components/ILIAS/COPage/Editor/UI/Init.php b/components/ILIAS/COPage/Editor/UI/Init.php index 00bbf42b9c45..b5e4706291ed 100755 --- a/components/ILIAS/COPage/Editor/UI/Init.php +++ b/components/ILIAS/COPage/Editor/UI/Init.php @@ -69,7 +69,7 @@ public function initUI( $dummy->getHTML(); // ensure modal.js from ui framework is loaded $this->ui->renderer()->render( - $this->ui->factory()->modal()->roundtrip("", $this->ui->factory()->legacy()->legacyContent("")) + $this->ui->factory()->modal()->roundtrip("", $this->ui->factory()->legacy()->content("")) ); } diff --git a/components/ILIAS/COPage/GlobalScreen/classes/class.ilCOPageEditGSToolProvider.php b/components/ILIAS/COPage/GlobalScreen/classes/class.ilCOPageEditGSToolProvider.php index 2b3644b3410b..e9ebe67c87ac 100755 --- a/components/ILIAS/COPage/GlobalScreen/classes/class.ilCOPageEditGSToolProvider.php +++ b/components/ILIAS/COPage/GlobalScreen/classes/class.ilCOPageEditGSToolProvider.php @@ -49,7 +49,7 @@ public function getToolsForContextStack(CalledContexts $called_contexts): array return $this->identification_provider->contextAwareIdentifier($id); }; $l = function (string $content) { - return $this->dic->ui()->factory()->legacy()->legacyContent($content); + return $this->dic->ui()->factory()->legacy()->content($content); }; $identification = $iff("copg_editor"); $hashed = $this->hash($identification->serialize()); diff --git a/components/ILIAS/COPage/IntLink/class.ilInternalLinkGUI.php b/components/ILIAS/COPage/IntLink/class.ilInternalLinkGUI.php index 382df114c223..ecd68551f5b3 100755 --- a/components/ILIAS/COPage/IntLink/class.ilInternalLinkGUI.php +++ b/components/ILIAS/COPage/IntLink/class.ilInternalLinkGUI.php @@ -948,7 +948,7 @@ public static function getModalTemplate(): array $lng = $DIC->language(); $ui = $DIC->ui(); - $modal = $ui->factory()->modal()->roundtrip($lng->txt("link_link"), $ui->factory()->legacy()->legacyContent("
")); + $modal = $ui->factory()->modal()->roundtrip($lng->txt("link_link"), $ui->factory()->legacy()->content("
")); $modalt["show"] = $modal->getShowSignal()->getId(); $modalt["close"] = $modal->getCloseSignal()->getId(); $modalt["template"] = $ui->renderer()->renderAsync($modal); diff --git a/components/ILIAS/COPage/PC/InteractiveImage/IIMEditorInit.php b/components/ILIAS/COPage/PC/InteractiveImage/IIMEditorInit.php index 0b20af80e850..71dcaa8ff7e1 100755 --- a/components/ILIAS/COPage/PC/InteractiveImage/IIMEditorInit.php +++ b/components/ILIAS/COPage/PC/InteractiveImage/IIMEditorInit.php @@ -54,7 +54,7 @@ public function initUI( $dummy->getHTML(); // ensure modal.js from ui framework is loaded $this->ui->renderer()->render( - $this->ui->factory()->modal()->roundtrip("", $this->ui->factory()->legacy()->legacyContent("")) + $this->ui->factory()->modal()->roundtrip("", $this->ui->factory()->legacy()->content("")) ); } diff --git a/components/ILIAS/COPage/PC/InteractiveImage/InteractiveImageQueryActionHandler.php b/components/ILIAS/COPage/PC/InteractiveImage/InteractiveImageQueryActionHandler.php index 201a053b63c1..4daae639f3b9 100755 --- a/components/ILIAS/COPage/PC/InteractiveImage/InteractiveImageQueryActionHandler.php +++ b/components/ILIAS/COPage/PC/InteractiveImage/InteractiveImageQueryActionHandler.php @@ -471,7 +471,7 @@ protected function getBackgroundProperties(): string public function getModalTemplate(): array { $ui = $this->ui; - $modal = $ui->factory()->modal()->roundtrip('#title#', $ui->factory()->legacy()->legacyContent('#content#')) + $modal = $ui->factory()->modal()->roundtrip('#title#', $ui->factory()->legacy()->content('#content#')) ->withActionButtons([ $ui->factory()->button()->standard('#button_title#', '#'), ]); diff --git a/components/ILIAS/COPage/PC/InteractiveImage/class.ilPCInteractiveImage.php b/components/ILIAS/COPage/PC/InteractiveImage/class.ilPCInteractiveImage.php index 48aaf92d6855..1b1b2c3aed90 100755 --- a/components/ILIAS/COPage/PC/InteractiveImage/class.ilPCInteractiveImage.php +++ b/components/ILIAS/COPage/PC/InteractiveImage/class.ilPCInteractiveImage.php @@ -749,7 +749,7 @@ public function modifyPageContentPostXsl( $new_inner = $inner; } else { $pop = $this->ui->factory()->popover()->standard( - $this->ui->factory()->legacy()->legacyContent("#####popovercontent#####") + $this->ui->factory()->legacy()->content("#####popovercontent#####") ); $signal_id = $pop->getShowSignal()->getId(); //$new_inner = $this->ui->renderer()->render($pop); diff --git a/components/ILIAS/COPage/PC/MediaObject/class.ilPCMediaObject.php b/components/ILIAS/COPage/PC/MediaObject/class.ilPCMediaObject.php index a686c7249c96..9c97b6e4e6e5 100755 --- a/components/ILIAS/COPage/PC/MediaObject/class.ilPCMediaObject.php +++ b/components/ILIAS/COPage/PC/MediaObject/class.ilPCMediaObject.php @@ -455,7 +455,7 @@ public function modifyPageContentPostXsl( $suffix = "-" . $page->getParentType() . "-" . $page->getId(); $modal = $this->ui->factory()->modal()->roundtrip( $this->lng->txt("cont_fullscreen"), - $this->ui->factory()->legacy()->legacyContent("") + $this->ui->factory()->legacy()->content("") ); $show_signal = $modal->getShowSignal(); diff --git a/components/ILIAS/COPage/PC/Tabs/class.ilPCTabsGUI.php b/components/ILIAS/COPage/PC/Tabs/class.ilPCTabsGUI.php index d86336fd8fc5..24ad7c0a70af 100755 --- a/components/ILIAS/COPage/PC/Tabs/class.ilPCTabsGUI.php +++ b/components/ILIAS/COPage/PC/Tabs/class.ilPCTabsGUI.php @@ -617,7 +617,7 @@ protected function getTabPanels(): string $content = $this->getTabContent($cap["pc_id"]); $items[] = $ui->factory()->panel()->standard( $cap["caption"], - $ui->factory()->legacy()->legacyContent($content) + $ui->factory()->legacy()->content($content) ) ->withActions($dd); $cnt++; diff --git a/components/ILIAS/COPage/classes/class.ilPageObjectGUI.php b/components/ILIAS/COPage/classes/class.ilPageObjectGUI.php index 33f1628f58d9..d9a8a7675fef 100755 --- a/components/ILIAS/COPage/classes/class.ilPageObjectGUI.php +++ b/components/ILIAS/COPage/classes/class.ilPageObjectGUI.php @@ -2241,7 +2241,7 @@ public function insertPageToc(string $a_output): string $h["text"] = str_replace($page_toc_ph, "", $h["text"]); $listing->node( - $this->ui->factory()->legacy()->legacyContent("" . $h["text"] . ""), + $this->ui->factory()->legacy()->content("" . $h["text"] . ""), (string) $i, (string) ($par) ); diff --git a/components/ILIAS/Calendar/classes/Provider/CalendarMainBarProvider.php b/components/ILIAS/Calendar/classes/Provider/CalendarMainBarProvider.php index b67b1d6bb515..a88c6c0342b9 100755 --- a/components/ILIAS/Calendar/classes/Provider/CalendarMainBarProvider.php +++ b/components/ILIAS/Calendar/classes/Provider/CalendarMainBarProvider.php @@ -51,7 +51,7 @@ public function getStaticSubItems(): array ->withParent(StandardTopItemsProvider::getInstance()->getPersonalWorkspaceIdentification()) ->withPosition(30) ->withSymbol($icon) - ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->legacyContent("{$this->dic->language()->txt('component_not_active')}")) + ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->content("{$this->dic->language()->txt('component_not_active')}")) ->withAvailableCallable( function () { $settings = ilCalendarSettings::_getInstance(); diff --git a/components/ILIAS/Calendar/classes/class.ilCalendarBlockGUI.php b/components/ILIAS/Calendar/classes/class.ilCalendarBlockGUI.php index 2f5baa1f799e..d7d834806713 100755 --- a/components/ILIAS/Calendar/classes/class.ilCalendarBlockGUI.php +++ b/components/ILIAS/Calendar/classes/class.ilCalendarBlockGUI.php @@ -556,7 +556,7 @@ public function getHTML(): string // workaround to include asynch code from ui only one time, see #20853 if ($this->ctrl->isAsynch()) { - $f = $this->ui->factory()->legacy()->legacyContent(""); + $f = $this->ui->factory()->legacy()->content(""); $ret .= $this->ui->renderer()->renderAsync($f); } if (count($this->modals) > 0) { diff --git a/components/ILIAS/Calendar/classes/class.ilCalendarSubscriptionGUI.php b/components/ILIAS/Calendar/classes/class.ilCalendarSubscriptionGUI.php index df16cfc15280..ce80cd0a4f4d 100755 --- a/components/ILIAS/Calendar/classes/class.ilCalendarSubscriptionGUI.php +++ b/components/ILIAS/Calendar/classes/class.ilCalendarSubscriptionGUI.php @@ -135,7 +135,7 @@ protected function getModalForSubscription(): void $roundtrip = $this->ui_factory->modal()->roundtrip( $this->lng->txt('cal_calendar_subscription_modal_title'), - $this->ui_factory->legacy()->legacyContent($tpl->get()) + $this->ui_factory->legacy()->content($tpl->get()) ); echo $this->ui_renderer->render($roundtrip); exit; diff --git a/components/ILIAS/Calendar/classes/class.ilCalendarViewGUI.php b/components/ILIAS/Calendar/classes/class.ilCalendarViewGUI.php index 6237be9f03ef..bbd2661fb49b 100755 --- a/components/ILIAS/Calendar/classes/class.ilCalendarViewGUI.php +++ b/components/ILIAS/Calendar/classes/class.ilCalendarViewGUI.php @@ -266,7 +266,7 @@ public function getModalForApp(): void $modal_title = $this->getModalTitleByPlugins($modal_title); $modal = $this->ui_factory->modal()->roundtrip( $modal_title, - $this->ui_factory->legacy()->legacyContent($content) + $this->ui_factory->legacy()->content($content) )->withCancelButtonLabel($this->lng->txt("close")); echo $this->ui_renderer->renderAsync($modal); } diff --git a/components/ILIAS/Chatroom/classes/Provider/ChatMainBarProvider.php b/components/ILIAS/Chatroom/classes/Provider/ChatMainBarProvider.php index 59f204affe0c..9b017cb0cf9a 100755 --- a/components/ILIAS/Chatroom/classes/Provider/ChatMainBarProvider.php +++ b/components/ILIAS/Chatroom/classes/Provider/ChatMainBarProvider.php @@ -69,7 +69,7 @@ public function getStaticSubItems(): array ->withPosition(30) ->withSymbol($icon) ->withNonAvailableReason( - $this->dic->ui()->factory()->legacy()->legacyContent($this->dic->language()->txt('component_not_active')) + $this->dic->ui()->factory()->legacy()->content($this->dic->language()->txt('component_not_active')) ) ->withAvailableCallable( static function () use ($publicChatObjId): bool { diff --git a/components/ILIAS/Chatroom/classes/gui/class.ilChatroomViewGUI.php b/components/ILIAS/Chatroom/classes/gui/class.ilChatroomViewGUI.php index 5b0636d28f56..e83f49577a27 100755 --- a/components/ILIAS/Chatroom/classes/gui/class.ilChatroomViewGUI.php +++ b/components/ILIAS/Chatroom/classes/gui/class.ilChatroomViewGUI.php @@ -252,7 +252,7 @@ private function checkbox(Component $component): string private function legacy(string $html): Component { - return $this->uifactory->legacy()->legacyContent($html); + return $this->uifactory->legacy()->content($html); } /** diff --git a/components/ILIAS/CmiXapi/classes/class.ilCmiXapiStatementsTableGUI.php b/components/ILIAS/CmiXapi/classes/class.ilCmiXapiStatementsTableGUI.php index 7252ab425d34..2a9c4df0f260 100755 --- a/components/ILIAS/CmiXapi/classes/class.ilCmiXapiStatementsTableGUI.php +++ b/components/ILIAS/CmiXapi/classes/class.ilCmiXapiStatementsTableGUI.php @@ -169,7 +169,7 @@ protected function getRawDataModal(array $data): RoundTrip return $f->modal()->roundtrip( 'Raw Statement', - $f->legacy()->legacyContent('
' . $data['statement'] . '
') + $f->legacy()->content('
' . $data['statement'] . '
') )->withCancelButtonLabel($this->language->txt('close')); } diff --git a/components/ILIAS/Contact/classes/Provider/ContactMainBarProvider.php b/components/ILIAS/Contact/classes/Provider/ContactMainBarProvider.php index dae5ad676e66..d82fc5bccb34 100755 --- a/components/ILIAS/Contact/classes/Provider/ContactMainBarProvider.php +++ b/components/ILIAS/Contact/classes/Provider/ContactMainBarProvider.php @@ -63,7 +63,7 @@ public function getStaticSubItems(): array ->withParent(StandardTopItemsProvider::getInstance()->getCommunicationIdentification()) ->withPosition(20) ->withSymbol($icon) - ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->legacyContent($this->dic->language()->txt('component_not_active'))) + ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->content($this->dic->language()->txt('component_not_active'))) ->withAvailableCallable( static function (): bool { return ilBuddySystem::getInstance()->isEnabled(); diff --git a/components/ILIAS/Contact/classes/class.ilContactGUI.php b/components/ILIAS/Contact/classes/class.ilContactGUI.php index d27f853c55ad..4b07be7ae06c 100755 --- a/components/ILIAS/Contact/classes/class.ilContactGUI.php +++ b/components/ILIAS/Contact/classes/class.ilContactGUI.php @@ -372,7 +372,7 @@ protected function showContacts(): void $table = new ilBuddySystemRelationsTableGUI($this, 'showContacts'); $table->populate(); - $content[] = $this->ui_factory->legacy()->legacyContent($table->getHTML()); + $content[] = $this->ui_factory->legacy()->content($table->getHTML()); $this->tpl->setContent($this->ui_renderer->render($content)); $this->tpl->printToStdout(); diff --git a/components/ILIAS/ContentPage/classes/class.ilContentPageKioskModeView.php b/components/ILIAS/ContentPage/classes/class.ilContentPageKioskModeView.php index 2d683c033d1a..29ada3404a52 100755 --- a/components/ILIAS/ContentPage/classes/class.ilContentPageKioskModeView.php +++ b/components/ILIAS/ContentPage/classes/class.ilContentPageKioskModeView.php @@ -174,7 +174,7 @@ public function render( $this->ctrl->setParameterByClass(ilContentPagePageGUI::class, 'ref_id', $this->contentPageObject->getRefId()); - return $factory->legacy()->legacyContent(implode('', [ + return $factory->legacy()->content(implode('', [ $this->uiRenderer->render($this->messages), $forwarder->forward($this->ctrl->getLinkTargetByClass([ ilRepositoryGUI::class, ilObjContentPageGUI::class, ilContentPagePageGUI::class diff --git a/components/ILIAS/Course/classes/class.ilTutorialSupportBlockGUI.php b/components/ILIAS/Course/classes/class.ilTutorialSupportBlockGUI.php index f92138e5335e..beb6a14954fa 100644 --- a/components/ILIAS/Course/classes/class.ilTutorialSupportBlockGUI.php +++ b/components/ILIAS/Course/classes/class.ilTutorialSupportBlockGUI.php @@ -92,7 +92,7 @@ protected function createTutorItem( ) { return $tutor_item; } - $dropdown_actions[] = $this->ui->factory()->legacy()->legacyContent( + $dropdown_actions[] = $this->ui->factory()->legacy()->content( ilBuddySystemLinkButton::getInstanceByUserId($tutor_id)->getHTML() ); $dropdown = $this->ui->factory()->dropdown()->standard($dropdown_actions); diff --git a/components/ILIAS/Dashboard/Block/classes/class.ilDashboardBlockGUI.php b/components/ILIAS/Dashboard/Block/classes/class.ilDashboardBlockGUI.php index 90eb4ded69be..df6d8a1ec661 100755 --- a/components/ILIAS/Dashboard/Block/classes/class.ilDashboardBlockGUI.php +++ b/components/ILIAS/Dashboard/Block/classes/class.ilDashboardBlockGUI.php @@ -409,7 +409,7 @@ public function addCommandActions(): void if ($this->removeMultipleEnabled()) { $roundtrip_modal = $this->ui->factory()->modal()->roundtrip( $this->getRemoveMultipleActionText(), - $this->ui->factory()->legacy()->legacyContent('PH') + $this->ui->factory()->legacy()->content('PH') ); $roundtrip_modal = $roundtrip_modal->withAsyncRenderUrl( $this->ctrl->getLinkTarget( @@ -537,7 +537,7 @@ public function removeFromDeskRoundtripObject(): void case 'manage': $modal = $this->ui->factory()->modal()->roundtrip( $this->getRemoveMultipleActionText(), - $this->ui->factory()->legacy()->legacyContent($this->manage($replace_signal ?? null)) + $this->ui->factory()->legacy()->content($this->manage($replace_signal ?? null)) ); $content = $modal->withAdditionalOnLoadCode(function ($id) { return " @@ -554,7 +554,7 @@ public function removeFromDeskRoundtripObject(): void } $content = [ $this->ui->factory()->messageBox()->confirmation($question), - $this->ui->factory()->legacy()->legacyContent($this->confirmRemoveObject()) + $this->ui->factory()->legacy()->content($this->confirmRemoveObject()) ]; } $responseStream = Streams::ofString($this->ui->renderer()->renderAsync($content)); diff --git a/components/ILIAS/Dashboard/Block/classes/class.ilMembershipBlockGUI.php b/components/ILIAS/Dashboard/Block/classes/class.ilMembershipBlockGUI.php index 542eae194daf..2b970194ca42 100755 --- a/components/ILIAS/Dashboard/Block/classes/class.ilMembershipBlockGUI.php +++ b/components/ILIAS/Dashboard/Block/classes/class.ilMembershipBlockGUI.php @@ -38,7 +38,7 @@ public function emptyHandling(): string return $this->renderer->render( $this->factory->panel()->standard( $this->getTitle(), - $this->factory->legacy()->legacyContent($this->lng->txt('rep_mo_mem_dash')) + $this->factory->legacy()->content($this->lng->txt('rep_mo_mem_dash')) ) ); } diff --git a/components/ILIAS/Dashboard/Block/classes/class.ilSelectedItemsBlockGUI.php b/components/ILIAS/Dashboard/Block/classes/class.ilSelectedItemsBlockGUI.php index 3bc50dc9b811..6790a3c7b880 100755 --- a/components/ILIAS/Dashboard/Block/classes/class.ilSelectedItemsBlockGUI.php +++ b/components/ILIAS/Dashboard/Block/classes/class.ilSelectedItemsBlockGUI.php @@ -58,7 +58,7 @@ public function emptyHandling(): string return $this->renderer->render( $this->factory->panel()->standard( $this->getTitle(), - $this->factory->legacy()->legacyContent($this->renderer->render($mbox)) + $this->factory->legacy()->content($this->renderer->render($mbox)) ) ); } @@ -119,7 +119,7 @@ public function getConfigureModal(): RoundTrip { $roundtrip_modal = $this->ui->factory()->modal()->roundtrip( $this->lng->txt('rep_configure'), - $this->ui->factory()->legacy()->legacyContent('PH') + $this->ui->factory()->legacy()->content('PH') )->withAdditionalOnLoadCode(function ($id) { return "document.body.appendChild(document.getElementById('$id')); let configure_modal_script = document.body.appendChild(document.createElement('script')); diff --git a/components/ILIAS/EmployeeTalk/classes/Provider/MyStaffListEntryProvider.php b/components/ILIAS/EmployeeTalk/classes/Provider/MyStaffListEntryProvider.php index bb3a6f18e02a..ef74ab07594d 100755 --- a/components/ILIAS/EmployeeTalk/classes/Provider/MyStaffListEntryProvider.php +++ b/components/ILIAS/EmployeeTalk/classes/Provider/MyStaffListEntryProvider.php @@ -75,7 +75,7 @@ function () { return boolval($this->settings->get('enable_my_staff')); } ) - ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->legacyContent("{$this->dic->language()->txt('item_must_be_always_active')}")) + ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->content("{$this->dic->language()->txt('item_must_be_always_active')}")) ->withParent($this->organisationIdentifier) ->withTitle($title) ->withSymbol($icon) diff --git a/components/ILIAS/Exercise/Assignment/PanelBuilderUI.php b/components/ILIAS/Exercise/Assignment/PanelBuilderUI.php index 87b41964b8c8..9feb3c59fe0a 100755 --- a/components/ILIAS/Exercise/Assignment/PanelBuilderUI.php +++ b/components/ILIAS/Exercise/Assignment/PanelBuilderUI.php @@ -64,7 +64,7 @@ public function getPanel(Assignment $ass, int $user_id): \ILIAS\UI\Component\Pan // schedule card $sections = []; foreach ($pb->getProperties($pb::SEC_SCHEDULE) as $prop) { - $sections[] = $this->ui_factory->legacy()->legacyContent($prop["prop"] . ": " . $prop["val"]); + $sections[] = $this->ui_factory->legacy()->content($prop["prop"] . ": " . $prop["val"]); } $schedule_card = $this->ui_factory->card()->standard($this->lng->txt("exc_schedule")) ->withSections($sections); @@ -111,7 +111,7 @@ public function getPanel(Assignment $ass, int $user_id): \ILIAS\UI\Component\Pan $sub_panel = $this->ui_factory->panel()->sub( $title, - $this->ui_factory->legacy()->legacyContent($ctpl->get()) + $this->ui_factory->legacy()->content($ctpl->get()) ); if ($sec === $pb::SEC_INSTRUCTIONS && !$pb->getInstructionsHidden()) { $sub_panel = $sub_panel->withFurtherInformation($schedule_card); diff --git a/components/ILIAS/Exercise/GlobalScreen/classes/class.ilExerciseGSToolProvider.php b/components/ILIAS/Exercise/GlobalScreen/classes/class.ilExerciseGSToolProvider.php index 71d6a072f288..f0da30e4e9c3 100755 --- a/components/ILIAS/Exercise/GlobalScreen/classes/class.ilExerciseGSToolProvider.php +++ b/components/ILIAS/Exercise/GlobalScreen/classes/class.ilExerciseGSToolProvider.php @@ -55,7 +55,7 @@ public function getToolsForContextStack( return $this->identification_provider->contextAwareIdentifier($id); }; $l = function (string $content) { - return $this->dic->ui()->factory()->legacy()->legacyContent($content); + return $this->dic->ui()->factory()->legacy()->content($content); }; $tools[] = $this->factory->tool($iff("exc_ass_info")) ->withTitle($title) diff --git a/components/ILIAS/Exercise/Submission/class.ilExSubmissionObjectGUI.php b/components/ILIAS/Exercise/Submission/class.ilExSubmissionObjectGUI.php index bf1c065ee690..255ae28c3498 100755 --- a/components/ILIAS/Exercise/Submission/class.ilExSubmissionObjectGUI.php +++ b/components/ILIAS/Exercise/Submission/class.ilExSubmissionObjectGUI.php @@ -302,7 +302,7 @@ protected function renderResourceSelection( $r = $this->gui->ui()->renderer(); $p = $f->panel()->standard( $title, - $f->legacy()->legacyContent($html) + $f->legacy()->content($html) ); $this->tpl->setContent($r->render($p)); diff --git a/components/ILIAS/Exercise/classes/class.ilExerciseManagementGUI.php b/components/ILIAS/Exercise/classes/class.ilExerciseManagementGUI.php index bc6ce9099f18..ba28cb13cd0b 100755 --- a/components/ILIAS/Exercise/classes/class.ilExerciseManagementGUI.php +++ b/components/ILIAS/Exercise/classes/class.ilExerciseManagementGUI.php @@ -746,8 +746,8 @@ public function getReportPanel(array $a_data): string $card_tpl->parseCurrentBlock(); } - $main_panel = $this->ui_factory->panel()->sub($a_data['uname'], $this->ui_factory->legacy()->legacyContent($a_data['utext'])) - ->withFurtherInformation($this->ui_factory->card()->standard($this->lng->txt('text_assignment'))->withSections(array($this->ui_factory->legacy()->legacyContent($card_tpl->get()))))->withActions($actions_dropdown); + $main_panel = $this->ui_factory->panel()->sub($a_data['uname'], $this->ui_factory->legacy()->content($a_data['utext'])) + ->withFurtherInformation($this->ui_factory->card()->standard($this->lng->txt('text_assignment'))->withSections(array($this->ui_factory->legacy()->content($card_tpl->get()))))->withActions($actions_dropdown); $feedback_tpl = new ilTemplate("tpl.exc_report_feedback.html", true, true, "components/ILIAS/Exercise"); //if no feedback filter the feedback is displayed. Can be list submissions or compare submissions. @@ -790,7 +790,7 @@ public function getReportPanel(array $a_data): string : $a_data['comment']; $feedback_tpl->setVariable("COMMENT", $this->lng->txt('exc_comment') . ":
" . $comment); - $feedback_panel = $this->ui_factory->panel()->sub("", $this->ui_factory->legacy()->legacyContent($feedback_tpl->get())); + $feedback_panel = $this->ui_factory->panel()->sub("", $this->ui_factory->legacy()->content($feedback_tpl->get())); $report = $this->ui_factory->panel()->report("", array($main_panel, $feedback_panel)); @@ -831,7 +831,7 @@ public function getEvaluationModal( return "$('#$id').click(function() { $('#$form_id').submit(); return false; });"; }); - return $this->ui_factory->modal()->roundtrip(strtoupper($this->lng->txt("grade_evaluate")), $this->ui_factory->legacy()->legacyContent($modal_tpl->get()))->withActionButtons([$submit_btn]); + return $this->ui_factory->modal()->roundtrip(strtoupper($this->lng->txt("grade_evaluate")), $this->ui_factory->legacy()->content($modal_tpl->get()))->withActionButtons([$submit_btn]); } public function getEvaluationModalForm( @@ -1844,7 +1844,7 @@ protected function initIndividualDeadlineModal(): string // prepare modal $modal = $this->ui_factory->modal()->roundtrip( $lng->txt("exc_individual_deadline"), - $this->ui_factory->legacy()->legacyContent('
') + $this->ui_factory->legacy()->content('
') ); $ajax_url = $this->ctrl->getLinkTarget($this, "handleIndividualDeadlineCalls", "", true, false); diff --git a/components/ILIAS/Exercise/classes/class.ilObjExerciseGUI.php b/components/ILIAS/Exercise/classes/class.ilObjExerciseGUI.php index da132606d545..1752ac658352 100755 --- a/components/ILIAS/Exercise/classes/class.ilObjExerciseGUI.php +++ b/components/ILIAS/Exercise/classes/class.ilObjExerciseGUI.php @@ -959,7 +959,7 @@ public function showOverviewObject(): void )->withActive($am->getListModeLabel($this->getCurrentMode())); $html = ""; - $l = $f->legacy()->legacyContent("

"); + $l = $f->legacy()->content("

"); $html .= $r->render([$mode, $l, $panel]); $this->tpl->setContent( diff --git a/components/ILIAS/Export/Print/class.PrintProcessGUI.php b/components/ILIAS/Export/Print/class.PrintProcessGUI.php index 7c2d2a0c676c..8ad50cc10443 100755 --- a/components/ILIAS/Export/Print/class.PrintProcessGUI.php +++ b/components/ILIAS/Export/Print/class.PrintProcessGUI.php @@ -92,7 +92,7 @@ public function getModalElements( $ui->mainTemplate()->addJavaScript("assets/js/Form.js"); $modal = $ui->factory()->modal()->roundtrip( $this->lng->txt("exp_print_pdf"), - $ui->factory()->legacy()->legacyContent('some modal') + $ui->factory()->legacy()->content('some modal') )->withAsyncRenderUrl($selection_action); $print_button = $ui->factory()->button()->standard( $this->lng->txt("exp_print_pdf"), diff --git a/components/ILIAS/File/classes/class.ilFileKioskModeView.php b/components/ILIAS/File/classes/class.ilFileKioskModeView.php index 8aeb0e73741e..a895cd8d1dd6 100755 --- a/components/ILIAS/File/classes/class.ilFileKioskModeView.php +++ b/components/ILIAS/File/classes/class.ilFileKioskModeView.php @@ -103,7 +103,7 @@ public function updatePost(State $state, string $command, array $post): State public function render(State $state, Factory $factory, URLBuilder $url_builder, array $post = null): Component { $file_gui = new ilObjFileGUI($this->file_obj->getRefId()); - return $factory->legacy()->legacyContent($file_gui->buildInfoScreen(true)->getHTML()); + return $factory->legacy()->content($file_gui->buildInfoScreen(true)->getHTML()); } protected function buildLearningProgressToggleControl(ControlBuilder $builder): ControlBuilder diff --git a/components/ILIAS/File/classes/class.ilObjFileUploadDropzone.php b/components/ILIAS/File/classes/class.ilObjFileUploadDropzone.php index abccc6be94d3..66e047b70dd0 100755 --- a/components/ILIAS/File/classes/class.ilObjFileUploadDropzone.php +++ b/components/ILIAS/File/classes/class.ilObjFileUploadDropzone.php @@ -106,7 +106,7 @@ public function getDropzone(): FileDropzone $dropzone = $this->ui->factory()->dropzone()->file()->wrapper( $this->language->txt('upload_files'), $post_url, - $this->ui->factory()->legacy()->legacyContent($this->content ?? ''), + $this->ui->factory()->legacy()->content($this->content ?? ''), $this->ui->factory()->input()->field()->file( $this->upload_handler, $this->language->txt('upload_files'), diff --git a/components/ILIAS/Forum/classes/Provider/ForumGlobalScreenToolsProvider.php b/components/ILIAS/Forum/classes/Provider/ForumGlobalScreenToolsProvider.php index 39ae1061784c..3862ab0f67f2 100755 --- a/components/ILIAS/Forum/classes/Provider/ForumGlobalScreenToolsProvider.php +++ b/components/ILIAS/Forum/classes/Provider/ForumGlobalScreenToolsProvider.php @@ -47,7 +47,7 @@ public function getToolsForContextStack( return $this->identification_provider->contextAwareIdentifier($id); }; $l = function (string $content): Component { - return $this->dic->ui()->factory()->legacy()->legacyContent($content); + return $this->dic->ui()->factory()->legacy()->content($content); }; $tools = []; diff --git a/components/ILIAS/Forum/classes/class.ilObjForumGUI.php b/components/ILIAS/Forum/classes/class.ilObjForumGUI.php index 672df2d6a5c2..62f1bb620f48 100755 --- a/components/ILIAS/Forum/classes/class.ilObjForumGUI.php +++ b/components/ILIAS/Forum/classes/class.ilObjForumGUI.php @@ -1100,7 +1100,7 @@ private function addDraftButtonIfDraftsExists(string $cmd) $draft_modal = $this->factory->modal()->roundtrip( $this->lng->txt('drafts'), - [$this->factory->legacy()->legacyContent($threadsTemplate->get())] + [$this->factory->legacy()->content($threadsTemplate->get())] ); $this->modal_collection[] = $draft_modal; $edit_title = $this->factory->button()->standard($this->lng->txt('drafts'), '#')->withOnClick( @@ -2287,7 +2287,7 @@ static function (string $id) use ($form_id): string { ); $modal = $this->uiFactory->modal()->roundtrip( $this->lng->txt('activate_only_current'), - [$this->uifactory->legacy()->legacyContent($form->getHTML()), $message] + [$this->uifactory->legacy()->content($form->getHTML()), $message] )->withActionButtons([$submitBtn]); $action_button = $this->uiFactory->button()->standard($this->lng->txt('activate_post'), '#')->withOnClick( $modal->getShowSignal() @@ -5730,7 +5730,7 @@ private function renderSplitButton( $modalTemplate->setVariable('FORM_ACTION', $url); - $content = $this->uifactory->legacy()->legacyContent($modalTemplate->get()); + $content = $this->uifactory->legacy()->content($modalTemplate->get()); $submitBtn = $this->uiFactory->button()->primary( $this->lng->txt('submit'), '#' diff --git a/components/ILIAS/GlobalScreen/src/Scope/Layout/Factory/ContentModification.php b/components/ILIAS/GlobalScreen/src/Scope/Layout/Factory/ContentModification.php index 6fdc525296af..71db987d308b 100755 --- a/components/ILIAS/GlobalScreen/src/Scope/Layout/Factory/ContentModification.php +++ b/components/ILIAS/GlobalScreen/src/Scope/Layout/Factory/ContentModification.php @@ -19,7 +19,7 @@ namespace ILIAS\GlobalScreen\Scope\Layout\Factory; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; /** * Class ContentModification @@ -40,7 +40,7 @@ public function isFinal(): bool */ public function getClosureFirstArgumentType(): string { - return LegacyContent::class; + return Content::class; } /** @@ -48,7 +48,7 @@ public function getClosureFirstArgumentType(): string */ public function getClosureReturnType(): string { - return LegacyContent::class; + return Content::class; } /** diff --git a/components/ILIAS/GlobalScreen/src/Scope/Layout/ModificationHandler.php b/components/ILIAS/GlobalScreen/src/Scope/Layout/ModificationHandler.php index b4a8e0d95b22..333cd3ebd8aa 100755 --- a/components/ILIAS/GlobalScreen/src/Scope/Layout/ModificationHandler.php +++ b/components/ILIAS/GlobalScreen/src/Scope/Layout/ModificationHandler.php @@ -29,7 +29,7 @@ use ILIAS\UI\Component\Breadcrumbs\Breadcrumbs; use ILIAS\UI\Component\Image\Image; use ILIAS\UI\Component\Layout\Page\Page; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; use ILIAS\UI\Component\MainControls\Footer; use ILIAS\UI\Component\MainControls\MainBar; use ILIAS\UI\Component\MainControls\MetaBar; @@ -84,7 +84,7 @@ public function modifyPageWithClosure(Closure $closure_returning_page): void */ public function modifyContentWithClosure(Closure $closure_returning_content): void { - $this->replaceWithAutoWiredInstance(LegacyContent::class, $closure_returning_content); + $this->replaceWithAutoWiredInstance(Content::class, $closure_returning_content); } /** diff --git a/components/ILIAS/GlobalScreen/src/Scope/Layout/Provider/PagePart/DecoratedPagePartProvider.php b/components/ILIAS/GlobalScreen/src/Scope/Layout/Provider/PagePart/DecoratedPagePartProvider.php index c37984c46a5d..e62c4e7a2d67 100755 --- a/components/ILIAS/GlobalScreen/src/Scope/Layout/Provider/PagePart/DecoratedPagePartProvider.php +++ b/components/ILIAS/GlobalScreen/src/Scope/Layout/Provider/PagePart/DecoratedPagePartProvider.php @@ -23,7 +23,7 @@ use Closure; use ILIAS\UI\Component\Breadcrumbs\Breadcrumbs; use ILIAS\UI\Component\Image\Image; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; use ILIAS\UI\Component\MainControls\Footer; use ILIAS\UI\Component\MainControls\MainBar; use ILIAS\UI\Component\MainControls\MetaBar; @@ -53,7 +53,7 @@ public function __construct(private readonly PagePartProvider $original, private { } - private function getDecoratedOrOriginal(string $purpose, LegacyContent|null|MetaBar|MainBar|Breadcrumbs|Image|string|Footer|TContainer $original) + private function getDecoratedOrOriginal(string $purpose, Content|null|MetaBar|MainBar|Breadcrumbs|Image|string|Footer|TContainer $original) { if ($this->isDecorated($purpose)) { $deco = $this->deco; @@ -70,9 +70,9 @@ private function isDecorated(string $purpose): bool } - public function getContent(): ?LegacyContent + public function getContent(): ?Content { - return $this->getDecoratedOrOriginal(LegacyContent::class, $this->original->getContent()); + return $this->getDecoratedOrOriginal(Content::class, $this->original->getContent()); } diff --git a/components/ILIAS/GlobalScreen/src/Scope/Layout/Provider/PagePart/PagePartProvider.php b/components/ILIAS/GlobalScreen/src/Scope/Layout/Provider/PagePart/PagePartProvider.php index a27e3bca28a0..9a47152310e8 100755 --- a/components/ILIAS/GlobalScreen/src/Scope/Layout/Provider/PagePart/PagePartProvider.php +++ b/components/ILIAS/GlobalScreen/src/Scope/Layout/Provider/PagePart/PagePartProvider.php @@ -21,7 +21,7 @@ use ILIAS\UI\Component\Breadcrumbs\Breadcrumbs; use ILIAS\UI\Component\Image\Image; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; use ILIAS\UI\Component\MainControls\Footer; use ILIAS\UI\Component\MainControls\MainBar; use ILIAS\UI\Component\MainControls\MetaBar; @@ -35,9 +35,9 @@ interface PagePartProvider { /** - * @return LegacyContent|null + * @return Content|null */ - public function getContent(): ?LegacyContent; + public function getContent(): ?Content; /** * @return MetaBar|null diff --git a/components/ILIAS/GlobalScreen/src/Scope/Layout/Provider/PagePart/StandardPagePartProvider.php b/components/ILIAS/GlobalScreen/src/Scope/Layout/Provider/PagePart/StandardPagePartProvider.php index 9c63ecd294a4..0b8f5051f21a 100755 --- a/components/ILIAS/GlobalScreen/src/Scope/Layout/Provider/PagePart/StandardPagePartProvider.php +++ b/components/ILIAS/GlobalScreen/src/Scope/Layout/Provider/PagePart/StandardPagePartProvider.php @@ -26,7 +26,7 @@ use ILIAS\GlobalScreen\Scope\Tool\Factory\isToolItem; use ILIAS\UI\Component\Breadcrumbs\Breadcrumbs; use ILIAS\UI\Component\Image\Image; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; use ILIAS\UI\Component\MainControls\Footer; use ILIAS\UI\Component\MainControls\MainBar; use ILIAS\UI\Component\MainControls\MetaBar; @@ -67,9 +67,9 @@ public function __construct() } - public function getContent(): ?LegacyContent + public function getContent(): ?Content { - return $this->content ?? $this->ui->factory()->legacy()->legacyContent(""); + return $this->content ?? $this->ui->factory()->legacy()->content(""); } diff --git a/components/ILIAS/GlobalScreen/src/Scope/MainMenu/Collector/Renderer/BaseTypeRenderer.php b/components/ILIAS/GlobalScreen/src/Scope/MainMenu/Collector/Renderer/BaseTypeRenderer.php index b9cb87c6f39c..e5e43ed9521e 100755 --- a/components/ILIAS/GlobalScreen/src/Scope/MainMenu/Collector/Renderer/BaseTypeRenderer.php +++ b/components/ILIAS/GlobalScreen/src/Scope/MainMenu/Collector/Renderer/BaseTypeRenderer.php @@ -82,7 +82,7 @@ public function getComponentForItem(isItem $item, bool $with_content = true): Co public function getComponentWithContent(isItem $item): Component { - return $this->ui_factory->legacy()->legacyContent($item->getProviderIdentification()->serialize()); + return $this->ui_factory->legacy()->content($item->getProviderIdentification()->serialize()); } public function getComponentWithoutContent(isItem $item): Component @@ -91,7 +91,7 @@ public function getComponentWithoutContent(isItem $item): Component return $this->getComponentWithContent($item); } /** @var $item supportsAsynchronousLoading $content */ - $content = $this->ui_factory->legacy()->legacyContent('...'); + $content = $this->ui_factory->legacy()->content('...'); $name = $item instanceof hasTitle ? $item->getTitle() : "-"; $slate = $this->ui_factory->mainControls()->slate()->legacy( $name, diff --git a/components/ILIAS/GlobalScreen/src/Scope/MainMenu/Collector/Renderer/ComplexItemRenderer.php b/components/ILIAS/GlobalScreen/src/Scope/MainMenu/Collector/Renderer/ComplexItemRenderer.php index 58fcb74e363a..248682d14f52 100755 --- a/components/ILIAS/GlobalScreen/src/Scope/MainMenu/Collector/Renderer/ComplexItemRenderer.php +++ b/components/ILIAS/GlobalScreen/src/Scope/MainMenu/Collector/Renderer/ComplexItemRenderer.php @@ -43,7 +43,7 @@ public function getComponentWithContent(isItem $item): Component * @var $item Complex */ global $DIC; - $content = $this->ui_factory->legacy()->legacyContent($DIC->ui()->renderer()->render($item->getContent())); + $content = $this->ui_factory->legacy()->content($DIC->ui()->renderer()->render($item->getContent())); return $this->ui_factory->mainControls()->slate()->legacy($item->getTitle(), $this->getStandardSymbol($item), $content); } diff --git a/components/ILIAS/GlobalScreen/src/Scope/MainMenu/Factory/AbstractBaseItem.php b/components/ILIAS/GlobalScreen/src/Scope/MainMenu/Factory/AbstractBaseItem.php index 7c5c335cee07..7165136fce53 100755 --- a/components/ILIAS/GlobalScreen/src/Scope/MainMenu/Factory/AbstractBaseItem.php +++ b/components/ILIAS/GlobalScreen/src/Scope/MainMenu/Factory/AbstractBaseItem.php @@ -24,7 +24,7 @@ use ILIAS\GlobalScreen\Identification\NullIdentification; use ILIAS\GlobalScreen\Scope\ComponentDecoratorTrait; use ILIAS\GlobalScreen\Scope\MainMenu\Collector\Information\TypeInformation; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; use Closure; use ILIAS\GlobalScreen\Scope\VisibilityAvailabilityTrait; use ILIAS\GlobalScreen\Scope\isDecorateable; @@ -41,7 +41,7 @@ abstract class AbstractBaseItem implements isItem, isDecorateable protected ?Closure $active_callable = null; protected bool $is_always_available = false; protected ?TypeInformation $type_information = null; - protected ?LegacyContent $non_available_reason = null; + protected ?Content $non_available_reason = null; /** * AbstractBaseItem constructor. @@ -59,7 +59,7 @@ public function getProviderIdentification(): IdentificationInterface return $this->provider_identification; } - public function withNonAvailableReason(LegacyContent $element): isItem + public function withNonAvailableReason(Content $element): isItem { $clone = clone $this; $clone->non_available_reason = $element; @@ -70,11 +70,11 @@ public function withNonAvailableReason(LegacyContent $element): isItem /** * @inheritDoc */ - public function getNonAvailableReason(): LegacyContent + public function getNonAvailableReason(): Content { global $DIC; - return $this->non_available_reason instanceof Legacy ? $this->non_available_reason : $DIC->ui()->factory()->legacy()->legacyContent(""); + return $this->non_available_reason instanceof Legacy ? $this->non_available_reason : $DIC->ui()->factory()->legacy()->content(""); } /** diff --git a/components/ILIAS/GlobalScreen/src/Scope/MainMenu/Factory/Item/Lost.php b/components/ILIAS/GlobalScreen/src/Scope/MainMenu/Factory/Item/Lost.php index 67ddff38584d..d98d90787116 100755 --- a/components/ILIAS/GlobalScreen/src/Scope/MainMenu/Factory/Item/Lost.php +++ b/components/ILIAS/GlobalScreen/src/Scope/MainMenu/Factory/Item/Lost.php @@ -104,7 +104,7 @@ public function getContent(): Component { global $DIC; - return $DIC->ui()->factory()->legacy()->legacyContent(""); + return $DIC->ui()->factory()->legacy()->content(""); } /** diff --git a/components/ILIAS/GlobalScreen/src/Scope/MainMenu/Factory/isItem.php b/components/ILIAS/GlobalScreen/src/Scope/MainMenu/Factory/isItem.php index c849fb9c0524..4887ca05f32b 100755 --- a/components/ILIAS/GlobalScreen/src/Scope/MainMenu/Factory/isItem.php +++ b/components/ILIAS/GlobalScreen/src/Scope/MainMenu/Factory/isItem.php @@ -22,7 +22,7 @@ use ILIAS\GlobalScreen\isGlobalScreenItem; use ILIAS\GlobalScreen\Scope\MainMenu\Collector\Information\TypeInformation; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; /** * Interface IFactory @@ -66,12 +66,12 @@ public function isAvailable(): bool; * this will be something like in * Services/Administration/templates/default/tpl.external_settings.html */ - public function withNonAvailableReason(LegacyContent $element): isItem; + public function withNonAvailableReason(Content $element): isItem; /** * @return Legacy */ - public function getNonAvailableReason(): LegacyContent; + public function getNonAvailableReason(): Content; /** * Return the default position for installation, this will be overridden by diff --git a/components/ILIAS/GlobalScreen/src/Scope/MetaBar/Collector/Renderer/BaseMetaBarItemRenderer.php b/components/ILIAS/GlobalScreen/src/Scope/MetaBar/Collector/Renderer/BaseMetaBarItemRenderer.php index cab4cbe3680c..006662b4a351 100755 --- a/components/ILIAS/GlobalScreen/src/Scope/MetaBar/Collector/Renderer/BaseMetaBarItemRenderer.php +++ b/components/ILIAS/GlobalScreen/src/Scope/MetaBar/Collector/Renderer/BaseMetaBarItemRenderer.php @@ -34,6 +34,6 @@ class BaseMetaBarItemRenderer extends AbstractMetaBarItemRenderer implements Met */ protected function getSpecificComponentForItem(isItem $item): Component { - return $this->ui->factory()->legacy()->legacyContent("no renderer found"); + return $this->ui->factory()->legacy()->content("no renderer found"); } } diff --git a/components/ILIAS/GlobalScreen/src/Scope/MetaBar/Factory/TopLegacyItem.php b/components/ILIAS/GlobalScreen/src/Scope/MetaBar/Factory/TopLegacyItem.php index 4b2cbfc949d2..4af09626f7dd 100755 --- a/components/ILIAS/GlobalScreen/src/Scope/MetaBar/Factory/TopLegacyItem.php +++ b/components/ILIAS/GlobalScreen/src/Scope/MetaBar/Factory/TopLegacyItem.php @@ -22,7 +22,7 @@ use ILIAS\GlobalScreen\Identification\IdentificationInterface; use ILIAS\GlobalScreen\Scope\MetaBar\Collector\Renderer\TopLegacyItemRenderer; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; use ILIAS\UI\Component\Symbol\Symbol; /** @@ -34,7 +34,7 @@ class TopLegacyItem extends AbstractBaseItem implements isItem, hasSymbol, hasTi protected ?Symbol $symbol = null; protected string $title = ""; - protected ?LegacyContent $content = null; + protected ?Content $content = null; /** * @inheritDoc @@ -91,7 +91,7 @@ public function getTitle(): string return $this->title; } - public function withLegacyContent(LegacyContent $content): self + public function withLegacyContent(Content $content): self { $clone = clone $this; $clone->content = $content; @@ -102,7 +102,7 @@ public function withLegacyContent(LegacyContent $content): self /** * @return Legacy */ - public function getLegacyContent(): LegacyContent + public function getLegacyContent(): Content { return $this->content; } diff --git a/components/ILIAS/GlobalScreen/src/Scope/Toast/Collector/Renderer/StandardToastRenderer.php b/components/ILIAS/GlobalScreen/src/Scope/Toast/Collector/Renderer/StandardToastRenderer.php index 9f8236787f5f..ceb4247f4d23 100755 --- a/components/ILIAS/GlobalScreen/src/Scope/Toast/Collector/Renderer/StandardToastRenderer.php +++ b/components/ILIAS/GlobalScreen/src/Scope/Toast/Collector/Renderer/StandardToastRenderer.php @@ -46,7 +46,7 @@ public function __construct(UIServices $ui) public function getToastComponentForItem(isItem $item): Component { if (!$item instanceof isStandardItem) { - return $this->ui->factory()->legacy()->legacyContent("Cannot render item of type " . get_class($item) . ""); + return $this->ui->factory()->legacy()->content("Cannot render item of type " . get_class($item) . ""); } // build empty UI\Toast diff --git a/components/ILIAS/GlobalScreen/src/Scope/Tool/Collector/Renderer/TreeToolItemRenderer.php b/components/ILIAS/GlobalScreen/src/Scope/Tool/Collector/Renderer/TreeToolItemRenderer.php index efe872c9ddf3..b1f366008e6b 100755 --- a/components/ILIAS/GlobalScreen/src/Scope/Tool/Collector/Renderer/TreeToolItemRenderer.php +++ b/components/ILIAS/GlobalScreen/src/Scope/Tool/Collector/Renderer/TreeToolItemRenderer.php @@ -44,6 +44,6 @@ public function getComponentForItem(isItem $item, bool $with_content = false): C $symbol = $this->getStandardSymbol($item); - return $this->ui_factory->mainControls()->slate()->legacy($item->getTitle(), $symbol, $this->ui_factory->legacy()->legacyContent($DIC->ui()->renderer()->render([$item->getTree()]))); + return $this->ui_factory->mainControls()->slate()->legacy($item->getTitle(), $symbol, $this->ui_factory->legacy()->content($DIC->ui()->renderer()->render([$item->getTree()]))); } } diff --git a/components/ILIAS/GlobalScreen/src/Scope/Tool/README.md b/components/ILIAS/GlobalScreen/src/Scope/Tool/README.md index 9f53d04eeda6..cae5b20d52ca 100755 --- a/components/ILIAS/GlobalScreen/src/Scope/Tool/README.md +++ b/components/ILIAS/GlobalScreen/src/Scope/Tool/README.md @@ -16,7 +16,7 @@ class ilMediaPoolGSToolProvider extends AbstractDynamicToolProvider { $tools = []; $iff = function ($id) { return $this->identification_provider->identifier($id); }; - $l = function (string $content) { return $this->dic->ui()->factory()->legacy()->legacyContent($content); }; + $l = function (string $content) { return $this->dic->ui()->factory()->legacy()->content($content); }; $additional_data = $called_contexts->getLast()->getAdditionalData(); if ($additional_data->exists(self::SHOW_FOLDERS_TOOL) && $additional_data->get(self::SHOW_FOLDERS_TOOL) === true) { diff --git a/components/ILIAS/Glossary/Flashcard/class.ilGlossaryFlashcardBoxGUI.php b/components/ILIAS/Glossary/Flashcard/class.ilGlossaryFlashcardBoxGUI.php index cd243ca7f291..1c06f1a03eca 100755 --- a/components/ILIAS/Glossary/Flashcard/class.ilGlossaryFlashcardBoxGUI.php +++ b/components/ILIAS/Glossary/Flashcard/class.ilGlossaryFlashcardBoxGUI.php @@ -163,7 +163,7 @@ public function showHidden(): void if ($this->glossary->getFlashcardsMode() === "term") { $flashcard = $this->ui_fac->panel()->standard( $this->lng->txt("term") . ": " . $this->getTermText(), - $this->ui_fac->legacy()->legacyContent("???") + $this->ui_fac->legacy()->content("???") ); } else { $flashcard = $this->ui_fac->panel()->standard( diff --git a/components/ILIAS/Glossary/Presentation/class.ilPresentationTableGUI.php b/components/ILIAS/Glossary/Presentation/class.ilPresentationTableGUI.php index f629f6974ab6..6b5fced11691 100644 --- a/components/ILIAS/Glossary/Presentation/class.ilPresentationTableGUI.php +++ b/components/ILIAS/Glossary/Presentation/class.ilPresentationTableGUI.php @@ -340,7 +340,7 @@ function ($row, array $record, $ui_factory) { ->withHeadline($record["term"]) ->withImportantFields([$record["short_txt"]]) ->withContent( - $ui_factory->legacy()->legacyContent($record["definition"]) + $ui_factory->legacy()->content($record["definition"]) ) ->withFurtherFieldsHeadline($this->lng->txt("md_advanced")) ->withFurtherFields($adv_data) diff --git a/components/ILIAS/Group/UserActions/classes/class.ilGroupAddToGroupActionGUI.php b/components/ILIAS/Group/UserActions/classes/class.ilGroupAddToGroupActionGUI.php index f520b8e5188d..0cd230af4d4c 100755 --- a/components/ILIAS/Group/UserActions/classes/class.ilGroupAddToGroupActionGUI.php +++ b/components/ILIAS/Group/UserActions/classes/class.ilGroupAddToGroupActionGUI.php @@ -162,11 +162,11 @@ public function sendResponse(string $a_content): void ); } if ($modal_exists) { - echo $this->ui->renderer()->renderAsync($this->ui->factory()->legacy()->legacyContent($a_content)); + echo $this->ui->renderer()->renderAsync($this->ui->factory()->legacy()->content($a_content)); } else { $mtpl = new ilTemplate("tpl.grp_add_to_grp_modal_content.html", true, true, "./components/ILIAS/Group/UserActions"); $mtpl->setVariable("CONTENT", $a_content); - $content = $this->ui->factory()->legacy()->legacyContent($mtpl->get()); + $content = $this->ui->factory()->legacy()->content($mtpl->get()); $modal = $this->ui->factory()->modal()->roundtrip( $lng->txt("grp_add_user_to_group"), $content diff --git a/components/ILIAS/Help/GlobalScreen/classes/class.ilHelpGSToolProvider.php b/components/ILIAS/Help/GlobalScreen/classes/class.ilHelpGSToolProvider.php index 19100ca26926..e96c8056922e 100755 --- a/components/ILIAS/Help/GlobalScreen/classes/class.ilHelpGSToolProvider.php +++ b/components/ILIAS/Help/GlobalScreen/classes/class.ilHelpGSToolProvider.php @@ -62,7 +62,7 @@ public function getToolsForContextStack(CalledContexts $called_contexts): array return $this->identification_provider->contextAwareIdentifier($id, true); }; $l = function (string $content) { - return $this->dic->ui()->factory()->legacy()->legacyContent($content); + return $this->dic->ui()->factory()->legacy()->content($content); }; $identification = $iff("help"); diff --git a/components/ILIAS/ILIASObject/classes/Translation/class.ilObjectTranslationGUI.php b/components/ILIAS/ILIASObject/classes/Translation/class.ilObjectTranslationGUI.php index 8421630c8d72..ccc7d2ab32ad 100755 --- a/components/ILIAS/ILIASObject/classes/Translation/class.ilObjectTranslationGUI.php +++ b/components/ILIAS/ILIASObject/classes/Translation/class.ilObjectTranslationGUI.php @@ -245,7 +245,7 @@ private function getAddLanguagesModal(): Modal { return $this->ui_factory->modal()->roundtrip( $this->lng->txt('confirm'), - $this->ui_factory->legacy()->legacyContent($this->lng->txt('obj_select_master_lang')), + $this->ui_factory->legacy()->content($this->lng->txt('obj_select_master_lang')), [ 'langs' => $this->getMultiLangFormInput(true) ], @@ -300,7 +300,7 @@ private function getActivateMultilingualityModal(): Modal { return $this->ui_factory->modal()->roundtrip( $this->lng->txt('confirm'), - $this->ui_factory->legacy()->legacyContent($this->lng->txt('obj_select_master_lang')), + $this->ui_factory->legacy()->content($this->lng->txt('obj_select_master_lang')), [ 'lang' => $this->getMultiLangFormInput() ], diff --git a/components/ILIAS/ILIASObject/classes/class.ilObjectGUI.php b/components/ILIAS/ILIASObject/classes/class.ilObjectGUI.php index c0e6add8766c..005b784e5df3 100755 --- a/components/ILIAS/ILIASObject/classes/class.ilObjectGUI.php +++ b/components/ILIAS/ILIASObject/classes/class.ilObjectGUI.php @@ -668,7 +668,7 @@ protected function getCreationFormsHTML(StandardForm|ilPropertyFormGUI|array $fo $form->setTitle(''); $form->setTitleIcon(''); $form->setTableWidth('100%'); - $content = $this->ui_factory->legacy()->legacyContent($form->getHTML()); + $content = $this->ui_factory->legacy()->content($form->getHTML()); } return $this->ui_renderer->render( diff --git a/components/ILIAS/ILIASObject/classes/class.ilObjectListGUI.php b/components/ILIAS/ILIASObject/classes/class.ilObjectListGUI.php index 7e2b734fead3..2fd824b52bf3 100755 --- a/components/ILIAS/ILIASObject/classes/class.ilObjectListGUI.php +++ b/components/ILIAS/ILIASObject/classes/class.ilObjectListGUI.php @@ -3150,7 +3150,7 @@ public function getAsCard( $sections = []; if ($description !== '') { - $sections[] = $ui->factory()->legacy()->legacyContent('
' . $description . '
'); + $sections[] = $ui->factory()->legacy()->content('
' . $description . '
'); } $this->populateCommands(false); diff --git a/components/ILIAS/LearningModule/Editing/GlobalScreen/classes/class.ilLMEditGSToolProvider.php b/components/ILIAS/LearningModule/Editing/GlobalScreen/classes/class.ilLMEditGSToolProvider.php index f6483ddcf234..9518ddce6c23 100755 --- a/components/ILIAS/LearningModule/Editing/GlobalScreen/classes/class.ilLMEditGSToolProvider.php +++ b/components/ILIAS/LearningModule/Editing/GlobalScreen/classes/class.ilLMEditGSToolProvider.php @@ -40,7 +40,7 @@ public function getToolsForContextStack(CalledContexts $called_contexts): array return $this->identification_provider->contextAwareIdentifier($id); }; $l = function (string $content) { - return $this->dic->ui()->factory()->legacy()->legacyContent($content); + return $this->dic->ui()->factory()->legacy()->content($content); }; $identification = $iff("tree"); $hashed = $this->hash($identification->serialize()); diff --git a/components/ILIAS/LearningModule/Presentation/GlobalScreen/classes/class.ilLMGSToolProvider.php b/components/ILIAS/LearningModule/Presentation/GlobalScreen/classes/class.ilLMGSToolProvider.php index 160be71da6cf..5a8938981a68 100755 --- a/components/ILIAS/LearningModule/Presentation/GlobalScreen/classes/class.ilLMGSToolProvider.php +++ b/components/ILIAS/LearningModule/Presentation/GlobalScreen/classes/class.ilLMGSToolProvider.php @@ -55,7 +55,7 @@ public function getToolsForContextStack( return $this->identification_provider->contextAwareIdentifier($id); }; $l = function (string $content) { - return $this->dic->ui()->factory()->legacy()->legacyContent($content); + return $this->dic->ui()->factory()->legacy()->content($content); }; if ($additional_data->is(self::SHOW_TOC_TOOL, true)) { @@ -171,7 +171,7 @@ public function getTocTool( return $this->identification_provider->contextAwareIdentifier($id); }; $l = function (string $content) { - return $this->dic->ui()->factory()->legacy()->legacyContent($content); + return $this->dic->ui()->factory()->legacy()->content($content); }; $title = $lng->txt("cont_toc"); diff --git a/components/ILIAS/LearningModule/Presentation/class.ilLMPresentationGUI.php b/components/ILIAS/LearningModule/Presentation/class.ilLMPresentationGUI.php index a55b46a14ef2..93f5fd41dad9 100755 --- a/components/ILIAS/LearningModule/Presentation/class.ilLMPresentationGUI.php +++ b/components/ILIAS/LearningModule/Presentation/class.ilLMPresentationGUI.php @@ -1569,7 +1569,7 @@ public function showPrintViewSelection(): void $modal = $this->ui->factory()->modal()->roundtrip( $this->lng->txt("cont_print_view"), - $this->ui->factory()->legacy()->legacyContent($tpl->get()) + $this->ui->factory()->legacy()->content($tpl->get()) ); echo $this->ui->renderer()->render($modal); exit(); @@ -2162,7 +2162,7 @@ public function showDownloadList(): void $modal = $this->ui->factory()->modal()->roundtrip( $this->lng->txt("download"), - $this->ui->factory()->legacy()->legacyContent($tpl->get()) + $this->ui->factory()->legacy()->content($tpl->get()) ); echo $this->ui->renderer()->render($modal); exit(); diff --git a/components/ILIAS/LearningModule/classes/class.ilLMMenuGUI.php b/components/ILIAS/LearningModule/classes/class.ilLMMenuGUI.php index d4c24c0cf2ce..9e6a707b840c 100755 --- a/components/ILIAS/LearningModule/classes/class.ilLMMenuGUI.php +++ b/components/ILIAS/LearningModule/classes/class.ilLMMenuGUI.php @@ -67,7 +67,7 @@ public function getEntries(): array $ui->mainTemplate()->addJavaScript("assets/js/Form.js"); $modal = $ui->factory()->modal()->roundtrip( $lng->txt("cont_print_view"), - $ui->factory()->legacy()->legacyContent('some modal') + $ui->factory()->legacy()->content('some modal') )->withAsyncRenderUrl($this->ctrl->getLinkTargetByClass("illmpresentationgui", "showPrintViewSelection")); $entries[] = [ @@ -90,7 +90,7 @@ public function getEntries(): array $access->checkAccess("read", "", $this->lm->getRefId())) { $modal = $ui->factory()->modal()->roundtrip( $lng->txt("download"), - $ui->factory()->legacy()->legacyContent('some modal') + $ui->factory()->legacy()->content('some modal') )->withAsyncRenderUrl($this->ctrl->getLinkTargetByClass("illmpresentationgui", "showDownloadList")); $entries[] = [ "label" => $this->lng->txt("download"), diff --git a/components/ILIAS/LearningModule/classes/class.ilLearningModuleKioskModeView.php b/components/ILIAS/LearningModule/classes/class.ilLearningModuleKioskModeView.php index 742f2703178a..193f3bf9c9f7 100755 --- a/components/ILIAS/LearningModule/classes/class.ilLearningModuleKioskModeView.php +++ b/components/ILIAS/LearningModule/classes/class.ilLearningModuleKioskModeView.php @@ -248,6 +248,6 @@ public function render( $content = $this->uiRenderer->render($this->messages); $content .= $this->ctrl->getHTML($this->lm_pres, ["cmd" => "layout"], ["illmpresentationgui"]); $content .= $this->uiRenderer->render($additional_content); - return $factory->legacy()->legacyContent($content); + return $factory->legacy()->content($content); } } diff --git a/components/ILIAS/LearningSequence/classes/GlobalScreen/class.ilLSViewLayoutProvider.php b/components/ILIAS/LearningSequence/classes/GlobalScreen/class.ilLSViewLayoutProvider.php index fc97a984505e..c4fcfb334864 100755 --- a/components/ILIAS/LearningSequence/classes/GlobalScreen/class.ilLSViewLayoutProvider.php +++ b/components/ILIAS/LearningSequence/classes/GlobalScreen/class.ilLSViewLayoutProvider.php @@ -29,7 +29,7 @@ use ILIAS\GlobalScreen\Scope\Layout\Factory\BreadCrumbsModification; use ILIAS\UI\Component\Breadcrumbs\Breadcrumbs; use ILIAS\GlobalScreen\Scope\Layout\Factory\ContentModification; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; use ILIAS\GlobalScreen\ScreenContext\AdditionalData\Collection; use ILIAS\GlobalScreen\Scope\Layout\Provider\PagePart\PagePartProvider; use ILIAS\GlobalScreen\Scope\Layout\Builder\StandardPageBuilder; @@ -124,9 +124,9 @@ public function getContentModification(CalledContexts $screen_context_stack): ?C // away the header here. return $this->globalScreen()->layout()->factory()->content() ->withModification( - function (?LegacyContent $content) use ($html): ?LegacyContent { + function (?Content $content) use ($html): ?Content { $ui = $this->dic->ui(); - return $ui->factory()->legacy()->legacyContent($html); + return $ui->factory()->legacy()->content($html); } ) ->withHighPriority(); diff --git a/components/ILIAS/LearningSequence/classes/Player/class.ilKioskPageRenderer.php b/components/ILIAS/LearningSequence/classes/Player/class.ilKioskPageRenderer.php index 7cef8ccd5ee5..4ed8924a6d26 100755 --- a/components/ILIAS/LearningSequence/classes/Player/class.ilKioskPageRenderer.php +++ b/components/ILIAS/LearningSequence/classes/Player/class.ilKioskPageRenderer.php @@ -77,7 +77,7 @@ public function buildToCSlate(LSTOCBuilder $toc, Icon $icon): Slate return $this->ui_factory->maincontrols()->slate()->legacy( $this->lng->txt('lso_mainbar_button_label_toc'), $icon->withSize("small"), - $this->ui_factory->legacy()->legacyContent($html) + $this->ui_factory->legacy()->content($html) ); } diff --git a/components/ILIAS/LearningSequence/classes/Player/class.ilObjLearningSequenceLearnerGUI.php b/components/ILIAS/LearningSequence/classes/Player/class.ilObjLearningSequenceLearnerGUI.php index 3b59a6fe2ff1..bfa7a66aea21 100755 --- a/components/ILIAS/LearningSequence/classes/Player/class.ilObjLearningSequenceLearnerGUI.php +++ b/components/ILIAS/LearningSequence/classes/Player/class.ilObjLearningSequenceLearnerGUI.php @@ -129,9 +129,9 @@ private function getWrappedHTML(array $components): string { array_unshift( $components, - $this->ui_factory->legacy()->legacyContent('
') + $this->ui_factory->legacy()->content('
') ); - $components[] = $this->ui_factory->legacy()->legacyContent('
'); + $components[] = $this->ui_factory->legacy()->content('
'); return $this->renderer->render($components); } @@ -143,25 +143,25 @@ private function getMainContent(string $cmd): array if ($cmd === self::CMD_STANDARD) { if ($this->intro === '') { - $contents[] = $this->ui_factory->legacy()->legacyContent($this->settings->getAbstract()); + $contents[] = $this->ui_factory->legacy()->content($this->settings->getAbstract()); $img = $this->settings->getAbstractImage(); if ($img) { $contents[] = $this->ui_factory->image()->responsive($img, ''); } } else { - $contents[] = $this->ui_factory->legacy()->legacyContent($this->intro); + $contents[] = $this->ui_factory->legacy()->content($this->intro); } } if ($cmd === self::CMD_EXTRO) { if ($this->extro === '') { - $contents[] = $this->ui_factory->legacy()->legacyContent($this->settings->getExtro()); + $contents[] = $this->ui_factory->legacy()->content($this->settings->getExtro()); $img = $this->settings->getExtroImage(); if ($img) { $contents[] = $this->ui_factory->image()->responsive($img, ''); } } else { - $contents[] = $this->ui_factory->legacy()->legacyContent($this->extro); + $contents[] = $this->ui_factory->legacy()->content($this->extro); } } return $contents; diff --git a/components/ILIAS/LegalDocuments/classes/Condition/Role.php b/components/ILIAS/LegalDocuments/classes/Condition/Role.php index d7f9df1019f3..d2444e2ca12b 100755 --- a/components/ILIAS/LegalDocuments/classes/Condition/Role.php +++ b/components/ILIAS/LegalDocuments/classes/Condition/Role.php @@ -41,7 +41,7 @@ public function __construct( public function asComponent(): Component { - return $this->create->legacy()->legacyContent(sprintf( + return $this->create->legacy()->content(sprintf( '
%s
%s
', $this->definition->translatedType(), $this->definition->translatedRole((int) $this->criterion->arguments()['role_id']) diff --git a/components/ILIAS/LegalDocuments/classes/Condition/UserCountry.php b/components/ILIAS/LegalDocuments/classes/Condition/UserCountry.php index f5ea83dd9974..fdf2779520f5 100755 --- a/components/ILIAS/LegalDocuments/classes/Condition/UserCountry.php +++ b/components/ILIAS/LegalDocuments/classes/Condition/UserCountry.php @@ -39,7 +39,7 @@ public function __construct( public function asComponent(): Component { - return $this->create->legacy()->legacyContent(sprintf( + return $this->create->legacy()->content(sprintf( '
%s
%s
', $this->definition->translatedType(), $this->definition->translatedCountry($this->criterion->arguments()['country'] ?? '') diff --git a/components/ILIAS/LegalDocuments/classes/Condition/UserLanguage.php b/components/ILIAS/LegalDocuments/classes/Condition/UserLanguage.php index 0859c88b20d6..a8bca65e87fc 100755 --- a/components/ILIAS/LegalDocuments/classes/Condition/UserLanguage.php +++ b/components/ILIAS/LegalDocuments/classes/Condition/UserLanguage.php @@ -39,7 +39,7 @@ public function __construct( public function asComponent(): Component { - return $this->create->legacy()->legacyContent(sprintf( + return $this->create->legacy()->content(sprintf( '
%s
%s
', $this->definition->translatedType(), $this->definition->translatedLanguage($this->criterion->arguments()['lng']) diff --git a/components/ILIAS/LegalDocuments/classes/ConsumerToolbox/ConsumerSlots/Agreement.php b/components/ILIAS/LegalDocuments/classes/ConsumerToolbox/ConsumerSlots/Agreement.php index f313ec6f83e0..0819ca76146f 100755 --- a/components/ILIAS/LegalDocuments/classes/ConsumerToolbox/ConsumerSlots/Agreement.php +++ b/components/ILIAS/LegalDocuments/classes/ConsumerToolbox/ConsumerSlots/Agreement.php @@ -85,7 +85,7 @@ private function showDocument(): Component { return $this->user ->matchingDocument() - ->map(fn(Document $document) => $this->ui->create()->legacy()->legacyContent($document->content()->value())) + ->map(fn(Document $document) => $this->ui->create()->legacy()->content($document->content()->value())) ->except(fn() => new Ok($this->ui->create()->legacy(sprintf( $this->ui->txt('no_agreement_description'), 'mailto:' . ilLegacyFormElementsUtil::prepareFormOutput(ilSystemSupportContacts::getMailsToAddress()) diff --git a/components/ILIAS/LegalDocuments/classes/ConsumerToolbox/ConsumerSlots/ModifyFooter.php b/components/ILIAS/LegalDocuments/classes/ConsumerToolbox/ConsumerSlots/ModifyFooter.php index fca4f853a52b..19e732e632ea 100755 --- a/components/ILIAS/LegalDocuments/classes/ConsumerToolbox/ConsumerSlots/ModifyFooter.php +++ b/components/ILIAS/LegalDocuments/classes/ConsumerToolbox/ConsumerSlots/ModifyFooter.php @@ -57,7 +57,7 @@ public function __invoke(Footer $footer): Footer public function renderModal(Footer $footer): Closure { return fn(DocumentContent $content): Footer => $footer->withAdditionalModalAndTrigger($this->ui->create()->modal()->roundtrip($content->title(), [ - $this->ui->create()->legacy()->legacyContent($this->ui->txt('usr_agreement_footer_intro')), + $this->ui->create()->legacy()->content($this->ui->txt('usr_agreement_footer_intro')), $this->ui->create()->divider()->horizontal(), $this->legal_documents->document()->contentAsComponent($content), $this->ui->create()->divider()->horizontal(), @@ -77,6 +77,6 @@ public function withdrawalButton(): Component ) ); - return $this->ui->create()->legacy()->legacyContent($template->get()); + return $this->ui->create()->legacy()->content($template->get()); } } diff --git a/components/ILIAS/LegalDocuments/classes/ConsumerToolbox/ConsumerSlots/ShowOnLoginPage.php b/components/ILIAS/LegalDocuments/classes/ConsumerToolbox/ConsumerSlots/ShowOnLoginPage.php index 4f63665423b3..5b2a8fe74ade 100755 --- a/components/ILIAS/LegalDocuments/classes/ConsumerToolbox/ConsumerSlots/ShowOnLoginPage.php +++ b/components/ILIAS/LegalDocuments/classes/ConsumerToolbox/ConsumerSlots/ShowOnLoginPage.php @@ -51,6 +51,6 @@ public function __invoke(): array $template->setVariable('LABEL', htmlentities($this->ui->txt('usr_agreement'))); $template->setVariable('HREF', $this->legal_documents->publicPage()->url()); - return [$this->ui->create()->legacy()->legacyContent($template->get())]; + return [$this->ui->create()->legacy()->content($template->get())]; } } diff --git a/components/ILIAS/LegalDocuments/classes/ConsumerToolbox/ConsumerSlots/WithdrawProcess.php b/components/ILIAS/LegalDocuments/classes/ConsumerToolbox/ConsumerSlots/WithdrawProcess.php index cc9958b7c8bf..e8299d7c905f 100755 --- a/components/ILIAS/LegalDocuments/classes/ConsumerToolbox/ConsumerSlots/WithdrawProcess.php +++ b/components/ILIAS/LegalDocuments/classes/ConsumerToolbox/ConsumerSlots/WithdrawProcess.php @@ -61,7 +61,7 @@ public function showValidatePasswordMessage(): array return [ $this->ui->create()->divider()->horizontal(), - $this->ui->create()->legacy()->legacyContent($this->ui->txt($lng)) + $this->ui->create()->legacy()->content($this->ui->txt($lng)) ]; } diff --git a/components/ILIAS/LegalDocuments/classes/DefaultMappings.php b/components/ILIAS/LegalDocuments/classes/DefaultMappings.php index 6634af876f4a..eee3be2836f6 100755 --- a/components/ILIAS/LegalDocuments/classes/DefaultMappings.php +++ b/components/ILIAS/LegalDocuments/classes/DefaultMappings.php @@ -69,7 +69,7 @@ public function conditionDefinitions(): SelectionMap public function contentAsComponent(): array { return [ - 'html' => fn($x) => $this->container->ui()->factory()->legacy()->legacyContent($x->value()), + 'html' => fn($x) => $this->container->ui()->factory()->legacy()->content($x->value()), ]; } } diff --git a/components/ILIAS/LegalDocuments/classes/Provide/ProvideDocument.php b/components/ILIAS/LegalDocuments/classes/Provide/ProvideDocument.php index d9c0216707ea..15a41f83ae6e 100755 --- a/components/ILIAS/LegalDocuments/classes/Provide/ProvideDocument.php +++ b/components/ILIAS/LegalDocuments/classes/Provide/ProvideDocument.php @@ -82,7 +82,7 @@ public function table(object $gui, string $command, ?EditLinks $edit_links = nul $table = ($this->create_table_gui)($gui, $command, $t); - return $this->container->ui()->factory()->legacy()->legacyContent($table->getHTML()); + return $this->container->ui()->factory()->legacy()->content($table->getHTML()); } public function chooseDocumentFor(ilObjUser $user): Result diff --git a/components/ILIAS/LegalDocuments/classes/Provide/ProvideHistory.php b/components/ILIAS/LegalDocuments/classes/Provide/ProvideHistory.php index 23febe3d0a1f..1af1709cb697 100755 --- a/components/ILIAS/LegalDocuments/classes/Provide/ProvideHistory.php +++ b/components/ILIAS/LegalDocuments/classes/Provide/ProvideHistory.php @@ -71,7 +71,7 @@ public function table(object $gui, string $command, string $reset_command, strin $create )); - return $this->container->ui()->factory()->legacy()->legacyContent($table->getHTML()); + return $this->container->ui()->factory()->legacy()->content($table->getHTML()); } public function acceptDocument(ilObjUser $user, Document $document): void diff --git a/components/ILIAS/LegalDocuments/tests/Condition/RoleTest.php b/components/ILIAS/LegalDocuments/tests/Condition/RoleTest.php index 191f8e484cc9..4a4fd0ed5364 100755 --- a/components/ILIAS/LegalDocuments/tests/Condition/RoleTest.php +++ b/components/ILIAS/LegalDocuments/tests/Condition/RoleTest.php @@ -49,11 +49,11 @@ public function testConstruct(): void public function testAsComponent(): void { - $legacy = $this->mock(Legacy\LegacyContent::class); + $legacy = $this->mock(Legacy\Content::class); $legacy_factory = $this->mock(Legacy\Factory::class); $legacy_factory ->expects($this->once()) - ->method('legacyContent') + ->method('content') ->willReturn($legacy); $this->assertSame($legacy, (new Role( diff --git a/components/ILIAS/LegalDocuments/tests/Condition/UserCountryTest.php b/components/ILIAS/LegalDocuments/tests/Condition/UserCountryTest.php index 9e0f294634c6..0b6b40b6b3a0 100755 --- a/components/ILIAS/LegalDocuments/tests/Condition/UserCountryTest.php +++ b/components/ILIAS/LegalDocuments/tests/Condition/UserCountryTest.php @@ -47,11 +47,11 @@ public function testConstruct(): void public function testAsComponent(): void { - $legacy = $this->mock(Legacy\LegacyContent::class); + $legacy = $this->mock(Legacy\Content::class); $legacy_factory = $this->mock(Legacy\Factory::class); $legacy_factory ->expects($this->once()) - ->method('legacyContent') + ->method('content') ->willReturn($legacy); $instance = new UserCountry( diff --git a/components/ILIAS/LegalDocuments/tests/Condition/UserLanguageTest.php b/components/ILIAS/LegalDocuments/tests/Condition/UserLanguageTest.php index aae5b86bc6ae..b1152343cde3 100755 --- a/components/ILIAS/LegalDocuments/tests/Condition/UserLanguageTest.php +++ b/components/ILIAS/LegalDocuments/tests/Condition/UserLanguageTest.php @@ -47,11 +47,11 @@ public function testConstruct(): void public function testAsComponent(): void { - $legacy = $this->mock(Legacy\LegacyContent::class); + $legacy = $this->mock(Legacy\Content::class); $legacy_factory = $this->mock(Legacy\Factory::class); $legacy_factory ->expects($this->once()) - ->method('legacyContent') + ->method('content') ->willReturn($legacy); $instance = new UserLanguage( diff --git a/components/ILIAS/LegalDocuments/tests/ConductorTest.php b/components/ILIAS/LegalDocuments/tests/ConductorTest.php index 158db13aa085..0ef9b0e48b98 100755 --- a/components/ILIAS/LegalDocuments/tests/ConductorTest.php +++ b/components/ILIAS/LegalDocuments/tests/ConductorTest.php @@ -34,7 +34,7 @@ use ILIAS\UI\Component\MainControls\Footer; use ILIAS\UI\Renderer; use ILIAS\UI\Component\Component; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; use ILIAS\HTTP\Wrapper\ArrayBasedRequestWrapper; use ILIAS\LegalDocuments\Provide; use ILIAS\LegalDocuments\Internal; @@ -73,7 +73,7 @@ public function testLoginPageHTML(): void $this->mock(Component::class), ]; - $space = $this->mock(LegacyContent::class); + $space = $this->mock(Content::class); $container = $this->mockTree(Container::class, [ 'ui' => [ diff --git a/components/ILIAS/LegalDocuments/tests/ConsumerToolbox/ConsumerSlots/ShowOnLoginPageTest.php b/components/ILIAS/LegalDocuments/tests/ConsumerToolbox/ConsumerSlots/ShowOnLoginPageTest.php index 4e04674f5615..58d6d451c700 100755 --- a/components/ILIAS/LegalDocuments/tests/ConsumerToolbox/ConsumerSlots/ShowOnLoginPageTest.php +++ b/components/ILIAS/LegalDocuments/tests/ConsumerToolbox/ConsumerSlots/ShowOnLoginPageTest.php @@ -53,11 +53,11 @@ public function testInvoke(): void $translated = 'Translated
'; $url = 'Dummy URL'; - $legacy = $this->mock(Legacy\LegacyContent::class); + $legacy = $this->mock(Legacy\Content::class); $legacy_factory = $this->mock(Legacy\Factory::class); $legacy_factory ->expects($this->once()) - ->method('legacyContent') + ->method('content') ->willReturn($legacy); diff --git a/components/ILIAS/LegalDocuments/tests/DefaultMappingsTest.php b/components/ILIAS/LegalDocuments/tests/DefaultMappingsTest.php index 98ad368fbc7a..bc27167cd1ea 100755 --- a/components/ILIAS/LegalDocuments/tests/DefaultMappingsTest.php +++ b/components/ILIAS/LegalDocuments/tests/DefaultMappingsTest.php @@ -71,11 +71,11 @@ public function testConditionDefinitions(): void public function testContentAsComponent(): void { - $legacy = $this->mock(Legacy\LegacyContent::class); + $legacy = $this->mock(Legacy\Content::class); $legacy_factory = $this->mock(Legacy\Factory::class); $legacy_factory ->expects($this->once()) - ->method('legacyContent') + ->method('content') ->willReturn($legacy); $container = $this->mockTree(Container::class, [ diff --git a/components/ILIAS/LegalDocuments/tests/Provide/ProvideDocumentTest.php b/components/ILIAS/LegalDocuments/tests/Provide/ProvideDocumentTest.php index 1a7ba9eecda7..281ea9fefe68 100755 --- a/components/ILIAS/LegalDocuments/tests/Provide/ProvideDocumentTest.php +++ b/components/ILIAS/LegalDocuments/tests/Provide/ProvideDocumentTest.php @@ -66,11 +66,11 @@ public function testConstruct(): void public function testTableReadOnly(): void { $dummy_gui = new stdClass(); - $legacy = $this->mock(Legacy\LegacyContent::class); + $legacy = $this->mock(Legacy\Content::class); $legacy_factory = $this->mock(Legacy\Factory::class); $legacy_factory ->expects($this->once()) - ->method('legacyContent') + ->method('content') ->willReturn($legacy); $container = $this->mockTree(Container::class, [ @@ -96,11 +96,11 @@ public function testTableReadOnly(): void public function testTableEditable(): void { $dummy_gui = new stdClass(); - $legacy = $this->mock(Legacy\LegacyContent::class); + $legacy = $this->mock(Legacy\Content::class); $legacy_factory = $this->mock(Legacy\Factory::class); $legacy_factory ->expects($this->once()) - ->method('legacyContent') + ->method('content') ->willReturn($legacy); $container = $this->mockTree(Container::class, [ diff --git a/components/ILIAS/LegalDocuments/tests/Provide/ProvideHistoryTest.php b/components/ILIAS/LegalDocuments/tests/Provide/ProvideHistoryTest.php index 60c905b20663..53abac9a7167 100755 --- a/components/ILIAS/LegalDocuments/tests/Provide/ProvideHistoryTest.php +++ b/components/ILIAS/LegalDocuments/tests/Provide/ProvideHistoryTest.php @@ -53,11 +53,11 @@ public function testConstruct(): void public function testTable(): void { $dummy_gui = new stdClass(); - $legacy = $this->mock(Legacy\LegacyContent::class); + $legacy = $this->mock(Legacy\Content::class); $legacy_factory = $this->mock(Legacy\Factory::class); $legacy_factory ->expects($this->once()) - ->method('legacyContent') + ->method('content') ->willReturn($legacy); $table = $this->mockMethod(LegacyTable::class, 'getHTML', [], 'table html'); diff --git a/components/ILIAS/Like/classes/class.ilLikeGUI.php b/components/ILIAS/Like/classes/class.ilLikeGUI.php index b045e1d300b5..e1133a1317d1 100755 --- a/components/ILIAS/Like/classes/class.ilLikeGUI.php +++ b/components/ILIAS/Like/classes/class.ilLikeGUI.php @@ -114,7 +114,7 @@ public function getHTML(): string // modal $modal_asyn_url = $ctrl->getLinkTarget($this, "renderModal", "", true, false); - $modal = $f->modal()->roundtrip('', $f->legacy()->legacyContent("")) + $modal = $f->modal()->roundtrip('', $f->legacy()->content("")) ->withAsyncRenderUrl($modal_asyn_url); $modal_show_sig_id = $modal->getShowSignal()->getId(); diff --git a/components/ILIAS/Mail/classes/Provider/MailGlobalScreenToolProvider.php b/components/ILIAS/Mail/classes/Provider/MailGlobalScreenToolProvider.php index 612d1d81e9c1..f30d52fc390f 100755 --- a/components/ILIAS/Mail/classes/Provider/MailGlobalScreenToolProvider.php +++ b/components/ILIAS/Mail/classes/Provider/MailGlobalScreenToolProvider.php @@ -24,7 +24,7 @@ use ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection; use ILIAS\GlobalScreen\Identification\IdentificationInterface; use ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; use ilMailExplorer; use ilMailGUI; @@ -60,10 +60,10 @@ public function getToolsForContextStack( ->tool($identification('mail_folders_tree')) ->withTitle($title) ->withSymbol($icon) - ->withContentWrapper(function (): LegacyContent { + ->withContentWrapper(function (): Content { $exp = new ilMailExplorer(new ilMailGUI(), $this->dic->user()->getId()); - return $this->dic->ui()->factory()->legacy()->legacyContent($exp->getHTML(true)); + return $this->dic->ui()->factory()->legacy()->content($exp->getHTML(true)); }); } diff --git a/components/ILIAS/Mail/classes/Provider/MailMainBarProvider.php b/components/ILIAS/Mail/classes/Provider/MailMainBarProvider.php index 809440444785..f3575187bc5e 100755 --- a/components/ILIAS/Mail/classes/Provider/MailMainBarProvider.php +++ b/components/ILIAS/Mail/classes/Provider/MailMainBarProvider.php @@ -54,7 +54,7 @@ public function getStaticSubItems(): array ->withPosition(10) ->withSymbol($icon) ->withNonAvailableReason( - $this->dic->ui()->factory()->legacy()->legacyContent($this->dic->language()->txt('component_not_active')) + $this->dic->ui()->factory()->legacy()->content($this->dic->language()->txt('component_not_active')) ) ->withAvailableCallable( static function () use ($dic): bool { diff --git a/components/ILIAS/MainMenu/classes/Provider/StandardTopItemsProvider.php b/components/ILIAS/MainMenu/classes/Provider/StandardTopItemsProvider.php index bcb168436678..b703235f51f7 100755 --- a/components/ILIAS/MainMenu/classes/Provider/StandardTopItemsProvider.php +++ b/components/ILIAS/MainMenu/classes/Provider/StandardTopItemsProvider.php @@ -103,7 +103,7 @@ public function getStaticTopItems(): array ->withTitle($title) ->withAction("ilias.php?baseClass=ilDashboardGUI&cmd=jumpToMemberships") ->withPosition(10) - ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->legacyContent("{$this->dic->language()->txt('component_not_active')}")) + ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->content("{$this->dic->language()->txt('component_not_active')}")) ->withAvailableCallable( function () { return true; diff --git a/components/ILIAS/MediaPool/GlobalScreen/classes/class.ilMediaPoolGSToolProvider.php b/components/ILIAS/MediaPool/GlobalScreen/classes/class.ilMediaPoolGSToolProvider.php index fc69a973f9a0..e6ee870e6c0d 100755 --- a/components/ILIAS/MediaPool/GlobalScreen/classes/class.ilMediaPoolGSToolProvider.php +++ b/components/ILIAS/MediaPool/GlobalScreen/classes/class.ilMediaPoolGSToolProvider.php @@ -46,7 +46,7 @@ public function getToolsForContextStack(CalledContexts $called_contexts): array return $this->identification_provider->contextAwareIdentifier($id); }; $l = function (string $content) { - return $this->dic->ui()->factory()->legacy()->legacyContent($content); + return $this->dic->ui()->factory()->legacy()->content($content); }; $ref_id = $called_contexts->current()->getReferenceId()->toInt(); diff --git a/components/ILIAS/MediaPool/classes/class.ilObjMediaPoolGUI.php b/components/ILIAS/MediaPool/classes/class.ilObjMediaPoolGUI.php index acbdfdcb7d98..c8eeb76ae32e 100755 --- a/components/ILIAS/MediaPool/classes/class.ilObjMediaPoolGUI.php +++ b/components/ILIAS/MediaPool/classes/class.ilObjMediaPoolGUI.php @@ -1400,7 +1400,7 @@ public static function getPreviewModalHTML( $modal = $internal_gui->ui()->factory()->modal()->roundtrip( $lng->txt("preview"), - $internal_gui->ui()->factory()->legacy()->legacyContent("") + $internal_gui->ui()->factory()->legacy()->content("") ); return $internal_gui->ui()->renderer()->render($modal); diff --git a/components/ILIAS/MetaData/classes/Copyright/NullRenderer.php b/components/ILIAS/MetaData/classes/Copyright/NullRenderer.php index 82267858b1c4..1993abd4a431 100644 --- a/components/ILIAS/MetaData/classes/Copyright/NullRenderer.php +++ b/components/ILIAS/MetaData/classes/Copyright/NullRenderer.php @@ -22,13 +22,13 @@ use ILIAS\UI\Component\Image\Image; use ILIAS\UI\Component\Link\Link; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; class NullRenderer implements RendererInterface { /** * Returns a string in a legacy UI component if only a string can be returned. - * @return Image[]|Link[]|LegacyContent[] + * @return Image[]|Link[]|Content[] */ public function toUIComponents(CopyrightDataInterface $copyright): array { diff --git a/components/ILIAS/MetaData/classes/Copyright/Renderer.php b/components/ILIAS/MetaData/classes/Copyright/Renderer.php index 6a69125cbc8a..3db6fc2c30db 100755 --- a/components/ILIAS/MetaData/classes/Copyright/Renderer.php +++ b/components/ILIAS/MetaData/classes/Copyright/Renderer.php @@ -25,7 +25,7 @@ use ILIAS\UI\Component\Link\Link; use ILIAS\ResourceStorage\Services as IRSS; use ILIAS\UI\Component\Link\Relationship; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; class Renderer implements RendererInterface { @@ -43,7 +43,7 @@ public function __construct( } /** - * @return Icon[]|Link[]|LegacyContent[] + * @return Icon[]|Link[]|Content[] */ public function toUIComponents(CopyrightDataInterface $copyright): array { @@ -149,9 +149,9 @@ protected function standardLink(string $label, string $action): Link return $this->factory->link()->standard($label, $action); } - protected function textInLegacy(string $text): LegacyContent + protected function textInLegacy(string $text): Content { - return $this->factory->legacy()->legacyContent($text); + return $this->factory->legacy()->content($text); } protected function getSourceFromIRSS(string $string_id): string diff --git a/components/ILIAS/MetaData/classes/Copyright/RendererInterface.php b/components/ILIAS/MetaData/classes/Copyright/RendererInterface.php index 4931ecb4210d..79adadd0a909 100755 --- a/components/ILIAS/MetaData/classes/Copyright/RendererInterface.php +++ b/components/ILIAS/MetaData/classes/Copyright/RendererInterface.php @@ -22,13 +22,13 @@ use ILIAS\UI\Component\Image\Image; use ILIAS\UI\Component\Link\Link; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; interface RendererInterface { /** * Returns a string in a legacy UI component if only a string can be returned. - * @return Image[]|Link[]|LegacyContent[] + * @return Image[]|Link[]|Content[] */ public function toUIComponents(CopyrightDataInterface $copyright): array; diff --git a/components/ILIAS/MetaData/classes/Services/CopyrightHelper/Copyright.php b/components/ILIAS/MetaData/classes/Services/CopyrightHelper/Copyright.php index 667661a2862a..e4a897927729 100644 --- a/components/ILIAS/MetaData/classes/Services/CopyrightHelper/Copyright.php +++ b/components/ILIAS/MetaData/classes/Services/CopyrightHelper/Copyright.php @@ -22,7 +22,7 @@ use ILIAS\UI\Component\Image\Image; use ILIAS\UI\Component\Link\Link; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; use ILIAS\MetaData\Copyright\EntryInterface; use ILIAS\MetaData\Copyright\RendererInterface; use ILIAS\MetaData\Copyright\Identifiers\HandlerInterface as IdentifierHandler; @@ -74,7 +74,7 @@ public function description(): string * The copyright as UI Components, as it should be presented in the * UI almost everywhere. * If only a string can be returned, it is returned in a legacy UI component. - * @return Image[]|Link[]|LegacyContent[] + * @return Image[]|Link[]|Content[] */ public function presentAsUIComponents(): array { diff --git a/components/ILIAS/MetaData/classes/Services/CopyrightHelper/CopyrightInterface.php b/components/ILIAS/MetaData/classes/Services/CopyrightHelper/CopyrightInterface.php index ae783f49e6cf..5d621c940584 100644 --- a/components/ILIAS/MetaData/classes/Services/CopyrightHelper/CopyrightInterface.php +++ b/components/ILIAS/MetaData/classes/Services/CopyrightHelper/CopyrightInterface.php @@ -22,7 +22,7 @@ use ILIAS\UI\Component\Image\Image; use ILIAS\UI\Component\Link\Link; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; interface CopyrightInterface { @@ -40,7 +40,7 @@ public function description(): string; * The copyright as UI Components, as it should be presented in the * UI almost everywhere. * If only a string can be returned, it is returned in a legacy UI component. - * @return Image[]|Link[]|LegacyContent[] + * @return Image[]|Link[]|Content[] */ public function presentAsUIComponents(): array; diff --git a/components/ILIAS/MetaData/classes/Services/CopyrightHelper/NullCopyright.php b/components/ILIAS/MetaData/classes/Services/CopyrightHelper/NullCopyright.php index 8f76f9e5812b..e710bf873277 100644 --- a/components/ILIAS/MetaData/classes/Services/CopyrightHelper/NullCopyright.php +++ b/components/ILIAS/MetaData/classes/Services/CopyrightHelper/NullCopyright.php @@ -22,7 +22,7 @@ use ILIAS\UI\Component\Image\Image; use ILIAS\UI\Component\Link\Link; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; class NullCopyright implements CopyrightInterface { @@ -55,7 +55,7 @@ public function description(): string * The copyright as UI Components, as it should be presented in the * UI almost everywhere. * If only a string can be returned, it is returned in a legacy UI component. - * @return Image[]|Link[]|LegacyContent[] + * @return Image[]|Link[]|Content[] */ public function presentAsUIComponents(): array { diff --git a/components/ILIAS/MetaData/tests/Copyright/RendererTest.php b/components/ILIAS/MetaData/tests/Copyright/RendererTest.php index 1903266b8ad7..b3b3273858c5 100755 --- a/components/ILIAS/MetaData/tests/Copyright/RendererTest.php +++ b/components/ILIAS/MetaData/tests/Copyright/RendererTest.php @@ -23,10 +23,10 @@ use PHPUnit\Framework\TestCase; use ILIAS\UI\Component\Symbol\Icon\Icon; use ILIAS\UI\Component\Link\Link; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; use ILIAS\UI\Implementation\Component\Symbol\Icon\Icon as IIcon; use ILIAS\UI\Implementation\Component\Link\Link as ILink; -use ILIAS\UI\Implementation\Component\Legacy\LegacyContent as ILegacy; +use ILIAS\UI\Implementation\Component\Legacy\Content as ILegacy; use ILIAS\Filesystem\Filesystem as WebFiles; use ILIAS\UI\Factory; use ILIAS\ResourceStorage\Services as IRSS; @@ -39,14 +39,14 @@ class RendererTest extends TestCase protected function getMockRenderer( Icon $icon, Link $link, - LegacyContent $legacy, + Content $legacy, string $src_from_irss ): Renderer { return new class ($icon, $link, $legacy, $src_from_irss) extends Renderer { public function __construct( protected Icon $icon, protected Link $link, - protected LegacyContent $legacy, + protected Content $legacy, protected string $src_from_irss ) { } @@ -70,7 +70,7 @@ protected function standardLink(string $label, string $action): Link return $this->link; } - protected function textInLegacy(string $text): LegacyContent + protected function textInLegacy(string $text): Content { /** @noinspection PhpUndefinedMethodInspection */ $this->legacy->checkParams($text); @@ -101,7 +101,7 @@ protected function getMockLink(): MockObject|Link ->getMock(); } - protected function getMockLegacy(): MockObject|LegacyContent + protected function getMockLegacy(): MockObject|Content { return $this->getMockBuilder(ILegacy::class) ->disableOriginalConstructor() @@ -252,7 +252,7 @@ public function altText(): string $result = $renderer->toUIComponents($data); $this->assertSame(2, count($result)); $this->assertInstanceOf(Icon::class, $result[0]); - $this->assertInstanceOf(LegacyContent::class, $result[1]); + $this->assertInstanceOf(Content::class, $result[1]); } public function testToUIComponentsWithLinkNoImage(): void diff --git a/components/ILIAS/MetaData/tests/Services/CopyrightHelper/CopyrightTest.php b/components/ILIAS/MetaData/tests/Services/CopyrightHelper/CopyrightTest.php index e1cce02d8360..656365b9cf38 100644 --- a/components/ILIAS/MetaData/tests/Services/CopyrightHelper/CopyrightTest.php +++ b/components/ILIAS/MetaData/tests/Services/CopyrightHelper/CopyrightTest.php @@ -30,14 +30,14 @@ use ILIAS\MetaData\Copyright\Identifiers\NullHandler; use ILIAS\MetaData\Copyright\NullRenderer; use PHPUnit\Framework\MockObject\MockObject; -use ILIAS\UI\Component\Legacy\LegacyContent; -use ILIAS\UI\Implementation\Component\Legacy\LegacyContent as ILegacy; +use ILIAS\UI\Component\Legacy\Content; +use ILIAS\UI\Implementation\Component\Legacy\Content as ILegacy; use PHPUnit\Framework\MockObject\Rule\AnyInvokedCount; use ILIAS\MetaData\Copyright\CopyrightData; class CopyrightTest extends TestCase { - protected function getLegacyComponent(): MockObject|LegacyContent + protected function getLegacyComponent(): MockObject|Content { return $this->getMockBuilder(ILegacy::class) ->disableOriginalConstructor() @@ -50,7 +50,7 @@ protected function getRenderer(): RendererInterface $legacy_component = $this->getLegacyComponent(); return new class ($legacy_component, $this->any()) extends NullRenderer { public function __construct( - protected MockObject|LegacyContent $legacy, + protected MockObject|Content $legacy, protected AnyInvokedCount $any ) { } diff --git a/components/ILIAS/MyStaff/classes/Provider/StaffMainBarProvider.php b/components/ILIAS/MyStaff/classes/Provider/StaffMainBarProvider.php index 39ddea3b49a1..8a9ec404538c 100755 --- a/components/ILIAS/MyStaff/classes/Provider/StaffMainBarProvider.php +++ b/components/ILIAS/MyStaff/classes/Provider/StaffMainBarProvider.php @@ -89,7 +89,7 @@ function (): bool { new ilMyStaffCachedAccessDecorator($this->dic, ilMyStaffAccess::getInstance()) )->hasCurrentUserAccessToMyStaff(); } - )->withNonAvailableReason($dic->ui()->factory()->legacy()->legacyContent("{$dic->language()->txt('component_not_active')}")); + )->withNonAvailableReason($dic->ui()->factory()->legacy()->content("{$dic->language()->txt('component_not_active')}")); $title = $this->dic->language()->txt("mm_enrolments"); $icon = $this->dic->ui()->factory()->symbol()->icon()->custom( @@ -119,7 +119,7 @@ function (): bool { new ilMyStaffCachedAccessDecorator($this->dic, ilMyStaffAccess::getInstance()) )->hasCurrentUserAccessToCourseMemberships(); } - )->withNonAvailableReason($dic->ui()->factory()->legacy()->legacyContent("{$dic->language()->txt('component_not_active')}")); + )->withNonAvailableReason($dic->ui()->factory()->legacy()->content("{$dic->language()->txt('component_not_active')}")); // My Certificates $icon = $this->dic->ui()->factory()->symbol()->icon()->standard(Standard::CERT, $title); @@ -144,7 +144,7 @@ function (): bool { new ilMyStaffCachedAccessDecorator($this->dic, ilMyStaffAccess::getInstance()) )->hasCurrentUserAccessToCertificates(); } - )->withNonAvailableReason($this->dic->ui()->factory()->legacy()->legacyContent("{$this->dic->language()->txt("component_not_active")}")); + )->withNonAvailableReason($this->dic->ui()->factory()->legacy()->content("{$this->dic->language()->txt("component_not_active")}")); // My Competences $icon = $this->dic->ui()->factory()->symbol()->icon()->standard(Standard::SKMG, $title); @@ -169,7 +169,7 @@ function (): bool { new ilMyStaffCachedAccessDecorator($this->dic, ilMyStaffAccess::getInstance()) )->hasCurrentUserAccessToCompetences(); } - )->withNonAvailableReason($this->dic->ui()->factory()->legacy()->legacyContent("{$this->dic->language()->txt("component_not_active")}")); + )->withNonAvailableReason($this->dic->ui()->factory()->legacy()->content("{$this->dic->language()->txt("component_not_active")}")); return $items; } diff --git a/components/ILIAS/News/classes/Provider/NewsMainBarProvider.php b/components/ILIAS/News/classes/Provider/NewsMainBarProvider.php index 08ad4ffabc1f..498f6d767136 100755 --- a/components/ILIAS/News/classes/Provider/NewsMainBarProvider.php +++ b/components/ILIAS/News/classes/Provider/NewsMainBarProvider.php @@ -47,7 +47,7 @@ public function getStaticSubItems(): array ->withParent(StandardTopItemsProvider::getInstance()->getCommunicationIdentification()) ->withPosition(30) ->withSymbol($icon) - ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->legacyContent($this->dic->language()->txt('component_not_active'))) + ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->content($this->dic->language()->txt('component_not_active'))) ->withAvailableCallable( static function () use ($dic): bool { return !($dic->settings()->get("block_activated_news") === null); diff --git a/components/ILIAS/News/classes/class.ilNewsForContextBlockGUI.php b/components/ILIAS/News/classes/class.ilNewsForContextBlockGUI.php index a781934ddeec..f11dad55b582 100755 --- a/components/ILIAS/News/classes/class.ilNewsForContextBlockGUI.php +++ b/components/ILIAS/News/classes/class.ilNewsForContextBlockGUI.php @@ -779,7 +779,7 @@ public function showNews(): string } else { $title = $lng->txt("news_internal_news"); } - $panel = $this->ui->factory()->panel()->standard($title, $this->ui->factory()->legacy()->legacyContent($content)); + $panel = $this->ui->factory()->panel()->standard($title, $this->ui->factory()->legacy()->content($content)); $parameter_name = 'news_page'; @@ -1190,7 +1190,7 @@ public function showFeedUrl(): string $panel = $this->ui->factory()->panel()->standard( $lng->txt("news_internal_news"), - $this->ui->factory()->legacy()->legacyContent($tpl->get()) + $this->ui->factory()->legacy()->content($tpl->get()) ); return $this->ui->renderer()->render($panel); diff --git a/components/ILIAS/News/classes/class.ilNewsTimelineGUI.php b/components/ILIAS/News/classes/class.ilNewsTimelineGUI.php index 77602417557a..adb47e969e40 100755 --- a/components/ILIAS/News/classes/class.ilNewsTimelineGUI.php +++ b/components/ILIAS/News/classes/class.ilNewsTimelineGUI.php @@ -457,7 +457,7 @@ protected function getEditModal($form = null): \ILIAS\UI\Component\Modal\Modal $modal = $this->gui->ui()->factory()->modal()->roundtrip( $this->lng->txt("edit"), - $this->ui->factory()->legacy()->legacyContent($form->getHTML()) + $this->ui->factory()->legacy()->content($form->getHTML()) ); return $modal; @@ -468,7 +468,7 @@ protected function renderDeleteModal(ilTemplate $tpl): void $mbox = $this->gui->ui()->factory()->messageBox()->confirmation( $this->lng->txt("news_really_delete_news") ); - $title = $this->gui->ui()->factory()->legacy()->legacyContent("

"); + $title = $this->gui->ui()->factory()->legacy()->content("

"); $modal = $this->gui->modal($this->lng->txt("delete")) ->content([$title, $mbox]) ->button($this->lng->txt("delete"), "#", false, "il.News.remove(); return false;"); diff --git a/components/ILIAS/News/classes/class.ilPDNewsBlockGUI.php b/components/ILIAS/News/classes/class.ilPDNewsBlockGUI.php index b86aa1f2c6fa..272bef3ecd3d 100755 --- a/components/ILIAS/News/classes/class.ilPDNewsBlockGUI.php +++ b/components/ILIAS/News/classes/class.ilPDNewsBlockGUI.php @@ -233,7 +233,7 @@ public function showFeedUrl(): string $panel = $this->ui->factory()->panel()->standard( $lng->txt("news_internal_news"), - $this->ui->factory()->legacy()->legacyContent($tpl->get()) + $this->ui->factory()->legacy()->content($tpl->get()) ); return $this->ui->renderer()->render($panel); diff --git a/components/ILIAS/Notes/GlobalScreen/classes/NotesMainBarProvider.php b/components/ILIAS/Notes/GlobalScreen/classes/NotesMainBarProvider.php index 97a736ec8362..624812ba31e0 100755 --- a/components/ILIAS/Notes/GlobalScreen/classes/NotesMainBarProvider.php +++ b/components/ILIAS/Notes/GlobalScreen/classes/NotesMainBarProvider.php @@ -48,7 +48,7 @@ public function getStaticSubItems(): array ->withParent(StandardTopItemsProvider::getInstance()->getCommunicationIdentification()) ->withPosition(50) ->withSymbol($icon) - ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->legacyContent($this->dic->language()->txt('component_not_active'))) + ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->content($this->dic->language()->txt('component_not_active'))) ->withAvailableCallable( static function () use ($dic): bool { return !$dic->settings()->get("disable_comments"); @@ -66,7 +66,7 @@ static function () use ($dic): bool { ->withParent(StandardTopItemsProvider::getInstance()->getPersonalWorkspaceIdentification()) ->withPosition(70) ->withSymbol($icon) - ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->legacyContent($this->dic->language()->txt('component_not_active'))) + ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->content($this->dic->language()->txt('component_not_active'))) ->withAvailableCallable( static function () use ($dic): bool { return !$dic->settings()->get("disable_notes"); diff --git a/components/ILIAS/Notes/Service/class.InternalGUIService.php b/components/ILIAS/Notes/Service/class.InternalGUIService.php index f96747772e35..d10b4ce3d2af 100755 --- a/components/ILIAS/Notes/Service/class.InternalGUIService.php +++ b/components/ILIAS/Notes/Service/class.InternalGUIService.php @@ -90,7 +90,7 @@ public function initJavascript( public function getModalTemplate(): array { $ui = $this->ui(); - $modal = $ui->factory()->modal()->roundtrip('#notes_title#', $ui->factory()->legacy()->legacyContent('')); + $modal = $ui->factory()->modal()->roundtrip('#notes_title#', $ui->factory()->legacy()->content('')); $modalt["show"] = $modal->getShowSignal()->getId(); $modalt["close"] = $modal->getCloseSignal()->getId(); $modalt["template"] = $ui->renderer()->renderAsync($modal); diff --git a/components/ILIAS/OnScreenChat/classes/Provider/OnScreenChatProvider.php b/components/ILIAS/OnScreenChat/classes/Provider/OnScreenChatProvider.php index 1968a493d0b7..7f491a5a6a4e 100755 --- a/components/ILIAS/OnScreenChat/classes/Provider/OnScreenChatProvider.php +++ b/components/ILIAS/OnScreenChat/classes/Provider/OnScreenChatProvider.php @@ -126,7 +126,7 @@ static function ($id): string { ) ]; - return $this->dic->ui()->factory()->legacy()->legacyContent($this->dic->ui()->renderer()->render($components)); + return $this->dic->ui()->factory()->legacy()->content($this->dic->ui()->renderer()->render($components)); }) ->withParent(StandardTopItemsProvider::getInstance()->getCommunicationIdentification()) ->withPosition(40) diff --git a/components/ILIAS/OnScreenChat/classes/class.ilOnScreenChatGUI.php b/components/ILIAS/OnScreenChat/classes/class.ilOnScreenChatGUI.php index d09241970bfd..a1f4a7cf1444 100755 --- a/components/ILIAS/OnScreenChat/classes/class.ilOnScreenChatGUI.php +++ b/components/ILIAS/OnScreenChat/classes/class.ilOnScreenChatGUI.php @@ -98,7 +98,7 @@ public function executeCommand(): void case 'inviteModal': $this->dic->language()->loadLanguageModule('chatroom'); $txt = $this->dic->language()->txt(...); - $modal = $this->dic->ui()->factory()->modal()->roundtrip($txt('chat_osc_invite_to_conversation'), $this->dic->ui()->factory()->legacy()->legacyContent($txt('chat_osc_search_modal_info')), [ + $modal = $this->dic->ui()->factory()->modal()->roundtrip($txt('chat_osc_invite_to_conversation'), $this->dic->ui()->factory()->legacy()->content($txt('chat_osc_search_modal_info')), [ $this->dic->ui()->factory()->input()->field()->text($txt('chat_osc_user')), ])->withSubmitLabel($txt('confirm')); $response = $this->renderAsyncModal('inviteModal', $modal); diff --git a/components/ILIAS/OrgUnit/classes/Positions/Authorities/class.ilOrgUnitAuthorityFormGUI.php b/components/ILIAS/OrgUnit/classes/Positions/Authorities/class.ilOrgUnitAuthorityFormGUI.php index 5d7aa8dc5510..075a3d6587db 100755 --- a/components/ILIAS/OrgUnit/classes/Positions/Authorities/class.ilOrgUnitAuthorityFormGUI.php +++ b/components/ILIAS/OrgUnit/classes/Positions/Authorities/class.ilOrgUnitAuthorityFormGUI.php @@ -41,7 +41,7 @@ public function initFormElements(): void $c = new ilCustomInputGUI($this->lng->txt('authorities')); $f = $this->parent_gui->dic()->ui()->factory(); $r = $this->parent_gui->dic()->ui()->renderer(); - $modal = $f->modal()->roundtrip("Modal", $f->legacy()->legacyContent(''))->withCloseWithKeyboard(false); + $modal = $f->modal()->roundtrip("Modal", $f->legacy()->content(''))->withCloseWithKeyboard(false); $button = $f->button() ->shy($this->lng->txt("open_authorities_modal"), '#') ->withOnClick($modal->getShowSignal()); diff --git a/components/ILIAS/OrgUnit/classes/Provider/OrgUnitMainBarProvider.php b/components/ILIAS/OrgUnit/classes/Provider/OrgUnitMainBarProvider.php index 4717332a1640..2ce81a2edd1c 100755 --- a/components/ILIAS/OrgUnit/classes/Provider/OrgUnitMainBarProvider.php +++ b/components/ILIAS/OrgUnit/classes/Provider/OrgUnitMainBarProvider.php @@ -69,7 +69,7 @@ public function getStaticSubItems(): array $linkOrgUnit = $this->mainmenu->link($this->orgUnitIdentifier) ->withAlwaysAvailable(true) ->withAction($action) - ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->legacyContent("{$this->dic->language()->txt('item_must_be_always_active')}")) + ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->content("{$this->dic->language()->txt('item_must_be_always_active')}")) ->withParent($this->organisationIdentifier) ->withTitle($title) ->withSymbol($icon) @@ -90,7 +90,7 @@ public function getStaticSubItems(): array $linkEmployeeTalkTemplates = $this->mainmenu->link($this->employeeTalkTemplateIdentifier) ->withAlwaysAvailable(true) ->withAction($action) - ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->legacyContent("{$this->dic->language()->txt('item_must_be_always_active')}")) + ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->content("{$this->dic->language()->txt('item_must_be_always_active')}")) ->withParent($this->organisationIdentifier) ->withTitle($title) ->withSymbol($icon) @@ -109,7 +109,7 @@ public function getStaticSubItems(): array $icon = $this->dic->ui()->factory()->symbol()->icon()->standard('org', $title); $items[] = $this->mainmenu->linkList($this->organisationIdentifier) ->withAlwaysAvailable(true) - ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->legacyContent("{$this->dic->language()->txt('item_must_be_always_active')}")) + ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->content("{$this->dic->language()->txt('item_must_be_always_active')}")) ->withParent($top) ->withTitle($title) ->withSymbol($icon) diff --git a/components/ILIAS/PersonalWorkspace/GlobalScreen/classes/class.WorkspaceMainBarProvider.php b/components/ILIAS/PersonalWorkspace/GlobalScreen/classes/class.WorkspaceMainBarProvider.php index b0c798e458bc..94d9a2a27c30 100755 --- a/components/ILIAS/PersonalWorkspace/GlobalScreen/classes/class.WorkspaceMainBarProvider.php +++ b/components/ILIAS/PersonalWorkspace/GlobalScreen/classes/class.WorkspaceMainBarProvider.php @@ -53,7 +53,7 @@ public function getStaticSubItems(): array ->withParent(StandardTopItemsProvider::getInstance()->getPersonalWorkspaceIdentification()) ->withPosition(60) ->withSymbol($icon) - ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->legacyContent("{$this->dic->language()->txt('component_not_active')}")) + ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->content("{$this->dic->language()->txt('component_not_active')}")) ->withAvailableCallable( function () use ($dic) { return !$dic->settings()->get("disable_personal_workspace"); diff --git a/components/ILIAS/PersonalWorkspace/GlobalScreen/classes/class.ilWorkspaceGSToolProvider.php b/components/ILIAS/PersonalWorkspace/GlobalScreen/classes/class.ilWorkspaceGSToolProvider.php index cae7418e2d19..ec897800fc5b 100755 --- a/components/ILIAS/PersonalWorkspace/GlobalScreen/classes/class.ilWorkspaceGSToolProvider.php +++ b/components/ILIAS/PersonalWorkspace/GlobalScreen/classes/class.ilWorkspaceGSToolProvider.php @@ -32,7 +32,7 @@ public function getToolsForContextStack(CalledContexts $called_contexts): array return $this->identification_provider->contextAwareIdentifier($id); }; $l = function (string $content) { - return $this->dic->ui()->factory()->legacy()->legacyContent($content); + return $this->dic->ui()->factory()->legacy()->content($content); }; $ref_id = $called_contexts->current()->getReferenceId()->toInt(); $tools[] = $this->factory->tool($iff("tree")) diff --git a/components/ILIAS/Portfolio/Exercise/class.ilPortfolioExerciseGUI.php b/components/ILIAS/Portfolio/Exercise/class.ilPortfolioExerciseGUI.php index 6837ad2ab5dd..4bce49daa75f 100755 --- a/components/ILIAS/Portfolio/Exercise/class.ilPortfolioExerciseGUI.php +++ b/components/ILIAS/Portfolio/Exercise/class.ilPortfolioExerciseGUI.php @@ -227,7 +227,7 @@ protected static function getExerciseInfo( } if ($tooltip) { - $modal = $ui->factory()->modal()->roundtrip($lng->txt("exc_instruction"), $ui->factory()->legacy()->legacyContent($tooltip)) + $modal = $ui->factory()->modal()->roundtrip($lng->txt("exc_instruction"), $ui->factory()->legacy()->content($tooltip)) ->withCancelButtonLabel($lng->txt("close")); $elements[] = $modal; $buttons[] = $ui->factory()->button()->standard($lng->txt("exc_instruction"), '#') diff --git a/components/ILIAS/Portfolio/classes/Provider/PortfolioMainBarProvider.php b/components/ILIAS/Portfolio/classes/Provider/PortfolioMainBarProvider.php index 521a0093d7f8..8151b6f5f3e5 100755 --- a/components/ILIAS/Portfolio/classes/Provider/PortfolioMainBarProvider.php +++ b/components/ILIAS/Portfolio/classes/Provider/PortfolioMainBarProvider.php @@ -46,7 +46,7 @@ public function getStaticSubItems(): array ->withParent(StandardTopItemsProvider::getInstance()->getPersonalWorkspaceIdentification()) ->withPosition(50) ->withSymbol($icon) - ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->legacyContent(($this->dic->language()->txt('component_not_active')))) + ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->content(($this->dic->language()->txt('component_not_active')))) ->withAvailableCallable( function () use ($dic) { return (bool) ($dic->settings()->get('user_portfolios')); diff --git a/components/ILIAS/Repository/GlobalScreen/classes/RepositoryMainBarProvider.php b/components/ILIAS/Repository/GlobalScreen/classes/RepositoryMainBarProvider.php index 6cbbae7876b6..49a467171455 100755 --- a/components/ILIAS/Repository/GlobalScreen/classes/RepositoryMainBarProvider.php +++ b/components/ILIAS/Repository/GlobalScreen/classes/RepositoryMainBarProvider.php @@ -35,7 +35,7 @@ use ILIAS\Repository\StandardGUIRequest; use ilStr; use ilPDSelectedItemsBlockViewSettings; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; use ilFavouritesListGUI; /** @@ -96,8 +96,8 @@ public function getStaticSubItems(): array $entries[] = $this->mainmenu->complex($this->if->identifier('rep_tree_view')) ->withVisibilityCallable($access_helper->isRepositoryVisible()) - ->withContentWrapper(function () use ($ref_id): LegacyContent { - return $this->dic->ui()->factory()->legacy()->legacyContent($this->renderRepoTree($ref_id)); + ->withContentWrapper(function () use ($ref_id): Content { + return $this->dic->ui()->factory()->legacy()->content($this->renderRepoTree($ref_id)); }) ->withSupportsAsynchronousLoading($asynch) ->withTitle($title) @@ -116,8 +116,8 @@ public function getStaticSubItems(): array ->withPosition(30) ->withSymbol($icon) ->withParent($top) - ->withContentWrapper(function () use ($p): LegacyContent { - return $this->dic->ui()->factory()->legacy()->legacyContent($p->renderLastVisited()); + ->withContentWrapper(function () use ($p): Content { + return $this->dic->ui()->factory()->legacy()->content($p->renderLastVisited()); }); $title = $this->dic->language()->txt("mm_favorites"); diff --git a/components/ILIAS/Repository/Service/Modal/class.ModalAdapterGUI.php b/components/ILIAS/Repository/Service/Modal/class.ModalAdapterGUI.php index 20f169f693e0..c1bc1b304297 100755 --- a/components/ILIAS/Repository/Service/Modal/class.ModalAdapterGUI.php +++ b/components/ILIAS/Repository/Service/Modal/class.ModalAdapterGUI.php @@ -70,7 +70,7 @@ public function getTitle(): string public function legacy(string $content): self { - $this->ui_content = [$this->ui->factory()->legacy()->legacyContent($content)]; + $this->ui_content = [$this->ui->factory()->legacy()->content($content)]; $this->form = null; return $this; } @@ -139,7 +139,7 @@ protected function getModalWithContent(): Modal\RoundTrip { $modal = []; if (!is_null($this->form)) { - $this->ui_content = [$this->ui->factory()->legacy()->legacyContent($this->form->render())]; + $this->ui_content = [$this->ui->factory()->legacy()->content($this->form->render())]; } $modal = $this->ui->factory()->modal()->roundtrip($this->getTitle(), $this->ui_content); if (count($this->action_buttons) > 0) { @@ -174,7 +174,7 @@ public function renderAsyncTriggerButton(string $button_title, string $url, $shy public function getAsyncTriggerButtonComponents(string $button_title, string $url, $shy = true): array { $ui = $this->ui; - $modal = $ui->factory()->modal()->roundtrip("", $ui->factory()->legacy()->legacyContent("")); + $modal = $ui->factory()->modal()->roundtrip("", $ui->factory()->legacy()->content("")); $url .= '&replaceSignal=' . $modal->getReplaceSignal()->getId(); $modal = $modal->withAsyncRenderUrl($url); if ($shy) { diff --git a/components/ILIAS/Search/classes/Provider/SearchMetaBarProvider.php b/components/ILIAS/Search/classes/Provider/SearchMetaBarProvider.php index 824f9e031d56..3a404ad15287 100755 --- a/components/ILIAS/Search/classes/Provider/SearchMetaBarProvider.php +++ b/components/ILIAS/Search/classes/Provider/SearchMetaBarProvider.php @@ -55,7 +55,7 @@ public function getMetaBarItems(): array $html = $main_search->getHTML(); } - return $this->dic->ui()->factory()->legacy()->legacyContent($uip->getHTML($html))->withAdditionalOnLoadCode( + return $this->dic->ui()->factory()->legacy()->content($uip->getHTML($html))->withAdditionalOnLoadCode( fn($id) => 'il.SearchMainMenu.init()' ); }; diff --git a/components/ILIAS/Setup/src/Metrics/Metric.php b/components/ILIAS/Setup/src/Metrics/Metric.php index 3f769427855e..71d6d53160d4 100755 --- a/components/ILIAS/Setup/src/Metrics/Metric.php +++ b/components/ILIAS/Setup/src/Metrics/Metric.php @@ -329,7 +329,7 @@ public function extractByStability(string $stability): array public function toUIReport(Factory $f, string $name): Report { $yaml = $this->toYAML(); - $sub = $f->panel()->sub("", $f->legacy()->legacyContent("
" . $yaml . "
")); + $sub = $f->panel()->sub("", $f->legacy()->content("
" . $yaml . "
")); return $f->panel()->report($name, [$sub]); } } diff --git a/components/ILIAS/Setup/tests/Metrics/MetricTest.php b/components/ILIAS/Setup/tests/Metrics/MetricTest.php index 91ec8d70d5e8..4d8f0cb306bc 100755 --- a/components/ILIAS/Setup/tests/Metrics/MetricTest.php +++ b/components/ILIAS/Setup/tests/Metrics/MetricTest.php @@ -263,11 +263,11 @@ public function testToUIReport(): void $panel_f = new PF($listing_f); $signal = new SignalGenerator(); $legacy_f = $this->createMock(\ILIAS\UI\Implementation\Component\Legacy\Factory::class); - $legacy = $legacy_f->legacyContent("
string
"); + $legacy = $legacy_f->content("
string
"); $legacy_f ->expects($this->once()) - ->method("legacyContent") + ->method("content") ->willReturn($legacy); $factory diff --git a/components/ILIAS/Skill/GlobalScreen/Provider/SkillMainBarProvider.php b/components/ILIAS/Skill/GlobalScreen/Provider/SkillMainBarProvider.php index a140f022653a..f95f3f9e8113 100755 --- a/components/ILIAS/Skill/GlobalScreen/Provider/SkillMainBarProvider.php +++ b/components/ILIAS/Skill/GlobalScreen/Provider/SkillMainBarProvider.php @@ -66,7 +66,7 @@ public function getStaticSubItems(): array ->withParent(StandardTopItemsProvider::getInstance()->getAchievementsIdentification()) ->withPosition(20) ->withSymbol($icon) - ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->legacyContent($this->dic->language()->txt('component_not_active'))) + ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->content($this->dic->language()->txt('component_not_active'))) ->withAvailableCallable( static function (): bool { $skmg_set = new ilSetting("skmg"); diff --git a/components/ILIAS/Skill/GlobalScreen/classes/class.ilSkillGSToolProvider.php b/components/ILIAS/Skill/GlobalScreen/classes/class.ilSkillGSToolProvider.php index 4454f4a48bc4..120d7e562e43 100755 --- a/components/ILIAS/Skill/GlobalScreen/classes/class.ilSkillGSToolProvider.php +++ b/components/ILIAS/Skill/GlobalScreen/classes/class.ilSkillGSToolProvider.php @@ -22,7 +22,7 @@ use ILIAS\GlobalScreen\Scope\Tool\Provider\AbstractDynamicToolProvider; use ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts; use ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; /** * Workspace GS tool provider @@ -66,8 +66,8 @@ public function getToolsForContextStack(CalledContexts $called_contexts): array $tools[] = $this->factory->tool($this->identification_provider->contextAwareIdentifier("tree")) ->withTitle($title) ->withSymbol($icon) - ->withContentWrapper(function () use ($tree_id): LegacyContent { - return $this->dic->ui()->factory()->legacy()->legacyContent($this->getSkillTree($tree_id)); + ->withContentWrapper(function () use ($tree_id): Content { + return $this->dic->ui()->factory()->legacy()->content($this->getSkillTree($tree_id)); }); } @@ -79,8 +79,8 @@ public function getToolsForContextStack(CalledContexts $called_contexts): array $tools[] = $this->factory->tool($this->identification_provider->contextAwareIdentifier("tree")) ->withTitle("Templates") ->withSymbol($icon) - ->withContentWrapper(function () use ($tree_id): LegacyContent { - return $this->dic->ui()->factory()->legacy()->legacyContent($this->getTemplateTree($tree_id)); + ->withContentWrapper(function () use ($tree_id): Content { + return $this->dic->ui()->factory()->legacy()->content($this->getTemplateTree($tree_id)); }); } return $tools; diff --git a/components/ILIAS/Skill/Personal/class.ilPersonalSkillsGUI.php b/components/ILIAS/Skill/Personal/class.ilPersonalSkillsGUI.php index fd26bcfe2522..f3452d7ff83b 100755 --- a/components/ILIAS/Skill/Personal/class.ilPersonalSkillsGUI.php +++ b/components/ILIAS/Skill/Personal/class.ilPersonalSkillsGUI.php @@ -711,7 +711,7 @@ public function renderSkillHTML( } if (!$has_at_least_one_entry) { - $panel_comps[] = $this->ui_fac->legacy()->legacyContent("
" . $lng->txt("skmg_no_skill_entries")); + $panel_comps[] = $this->ui_fac->legacy()->content("
" . $lng->txt("skmg_no_skill_entries")); } // suggested resources diff --git a/components/ILIAS/StudyProgramme/classes/class.ilObjStudyProgrammeAutoCategoriesGUI.php b/components/ILIAS/StudyProgramme/classes/class.ilObjStudyProgrammeAutoCategoriesGUI.php index f90b23ac0b54..82ba2f13d7f6 100755 --- a/components/ILIAS/StudyProgramme/classes/class.ilObjStudyProgrammeAutoCategoriesGUI.php +++ b/components/ILIAS/StudyProgramme/classes/class.ilObjStudyProgrammeAutoCategoriesGUI.php @@ -145,7 +145,7 @@ protected function view(bool $profile_not_public = false): void continue; } [$title, $link] = $this->getItemPath($ref_id); - $usr = $this->getUserRepresentation($ac->getLastEditorId()) ?? $this->ui_factory->legacy()->legacyContent('-'); + $usr = $this->getUserRepresentation($ac->getLastEditorId()) ?? $this->ui_factory->legacy()->content('-'); $modal = $this->getModal($ref_id); $collected_modals[] = $modal; $actions = $this->getItemAction( @@ -322,7 +322,7 @@ function ($id) use ($form_id) { $modal = $this->ui_factory->modal() ->roundtrip( $this->lng->txt('modal_categories_title'), - $this->ui_factory->legacy()->legacyContent($form->getHtml()) + $this->ui_factory->legacy()->content($form->getHtml()) ) ->withActionButtons([$submit]) ->withAdditionalOnLoadCode( diff --git a/components/ILIAS/StudyProgramme/classes/class.ilObjStudyProgrammeAutoMembershipsGUI.php b/components/ILIAS/StudyProgramme/classes/class.ilObjStudyProgrammeAutoMembershipsGUI.php index 9862177cb00c..6615fec085f6 100755 --- a/components/ILIAS/StudyProgramme/classes/class.ilObjStudyProgrammeAutoMembershipsGUI.php +++ b/components/ILIAS/StudyProgramme/classes/class.ilObjStudyProgrammeAutoMembershipsGUI.php @@ -139,7 +139,7 @@ protected function nextStep(): void $modal = $this->ui_factory->modal()->roundtrip( $this->txt('modal_member_auto_select_title'), - $this->ui_factory->legacy()->legacyContent($form->getHtml()) + $this->ui_factory->legacy()->content($form->getHtml()) ); $submit = $this->ui_factory->button()->primary($this->txt('add'), "#")->withOnLoadCode( @@ -169,7 +169,7 @@ protected function view(bool $profile_not_public = false): void $data = []; foreach ($this->getObject()->getAutomaticMembershipSources() as $ams) { $title = $this->getTitleRepresentation($ams); - $usr = $this->getUserRepresentation($ams->getLastEditorId()) ?? $this->ui_factory->legacy()->legacyContent('-'); + $usr = $this->getUserRepresentation($ams->getLastEditorId()) ?? $this->ui_factory->legacy()->content('-'); $modal = $this->getModal($ams->getSourceType(), $ams->getSourceId(), $ams->isSearchRecursive()); $collected_modals[] = $modal; $src_id = $ams->getSourceType() . '-' . $ams->getSourceId() . '-' . $ams->isSearchRecursive(); @@ -401,7 +401,7 @@ protected function getAsynchModalOutput(): void $modal = $this->ui_factory->modal()->roundtrip( $this->txt('modal_member_auto_select_title'), - $this->ui_factory->legacy()->legacyContent($form->getHtml()) + $this->ui_factory->legacy()->content($form->getHtml()) ); $this->ctrl->setParameter($this, self::F_ORIGINAL_SOURCE_TYPE, $current_src_type); diff --git a/components/ILIAS/Style/System/classes/Documentation/class.ilKSDocumentationEntryGUI.php b/components/ILIAS/Style/System/classes/Documentation/class.ilKSDocumentationEntryGUI.php index bf20f3dedb1d..8c2bfb4f5662 100755 --- a/components/ILIAS/Style/System/classes/Documentation/class.ilKSDocumentationEntryGUI.php +++ b/components/ILIAS/Style/System/classes/Documentation/class.ilKSDocumentationEntryGUI.php @@ -115,12 +115,12 @@ public function createUIComponentOfEntry(): Report } catch (\ILIAS\UI\NotImplementedException $e) { $example = "
This component is not yet fully implemented.
"; } - $content_part_1 = $this->f->legacy()->legacyContent($example); + $content_part_1 = $this->f->legacy()->content($example); $code = str_replace('" . $geshi->parse_code() . '
'; - $content_part_2 = $this->f->legacy()->legacyContent($code_html); + $content_part_2 = $this->f->legacy()->content($code_html); $content = [$content_part_1, $content_part_2]; $sub_panels[] = $this->f->panel()->sub($title, $content); } diff --git a/components/ILIAS/Style/System/classes/Provider/SystemStylesGlobalScreenToolProvider.php b/components/ILIAS/Style/System/classes/Provider/SystemStylesGlobalScreenToolProvider.php index 89845feb4b7d..747047e58a98 100755 --- a/components/ILIAS/Style/System/classes/Provider/SystemStylesGlobalScreenToolProvider.php +++ b/components/ILIAS/Style/System/classes/Provider/SystemStylesGlobalScreenToolProvider.php @@ -71,7 +71,7 @@ protected function buildTreeAsTool(): Tool ->tool($id_generator('system_styles_tree')) ->withTitle($title) ->withSymbol($icon) - ->withContent($this->dic->ui()->factory()->legacy()->legacyContent($this->dic->ui()->renderer()->render($this->getUITree()))); + ->withContent($this->dic->ui()->factory()->legacy()->content($this->dic->ui()->renderer()->render($this->getUITree()))); } protected function getUITree(): Tree diff --git a/components/ILIAS/Survey/Evaluation/class.ilSurveyEvaluationGUI.php b/components/ILIAS/Survey/Evaluation/class.ilSurveyEvaluationGUI.php index 21e0bbad41ae..275fc2ec1ceb 100755 --- a/components/ILIAS/Survey/Evaluation/class.ilSurveyEvaluationGUI.php +++ b/components/ILIAS/Survey/Evaluation/class.ilSurveyEvaluationGUI.php @@ -863,12 +863,12 @@ public function evaluation( $qblock = ilObjSurvey::_getQuestionblock($qdata["questionblock_id"]); if ($qblock["show_blocktitle"]) { $listing->node( - $this->ui->factory()->legacy()->legacyContent($qdata["questionblock_title"]), + $this->ui->factory()->legacy()->content($qdata["questionblock_title"]), "q" . $qdata["questionblock_id"] ); } else { $listing->node( - $this->ui->factory()->legacy()->legacyContent(""), + $this->ui->factory()->legacy()->content(""), "q" . $qdata["questionblock_id"] ); } @@ -887,7 +887,7 @@ public function evaluation( $toc_tpl->setVariable("LIST", $listing->render()); //TABLE OF CONTENTS - $panel_toc = $ui_factory->panel()->standard("", $ui_factory->legacy()->legacyContent($toc_tpl->get())); + $panel_toc = $ui_factory->panel()->standard("", $ui_factory->legacy()->content($toc_tpl->get())); $render_toc = $ui_renderer->render($panel_toc); $dtmpl->setVariable("PANEL_TOC", $render_toc); diff --git a/components/ILIAS/Survey/Mode/class.AbstractUIModifier.php b/components/ILIAS/Survey/Mode/class.AbstractUIModifier.php index a632a0c38107..ac129ab82ffd 100755 --- a/components/ILIAS/Survey/Mode/class.AbstractUIModifier.php +++ b/components/ILIAS/Survey/Mode/class.AbstractUIModifier.php @@ -367,7 +367,7 @@ public function getDetailPanels( // Question title anchor $anchor_id = "svyrdq" . $question->getId(); $title = "$qst_title"; - $panel_qst_card = $ui_factory->panel()->sub($title, $ui_factory->legacy()->legacyContent($svy_text)) + $panel_qst_card = $ui_factory->panel()->sub($title, $ui_factory->legacy()->content($svy_text)) ->withFurtherInformation($this->getPanelCard($question_res)); $panels[] = $panel_qst_card; @@ -390,7 +390,7 @@ public function getDetailPanels( )); - $panels[] = $ui_factory->panel()->sub("", $ui_factory->legacy()->legacyContent($a_tpl->get())); + $panels[] = $ui_factory->panel()->sub("", $ui_factory->legacy()->content($a_tpl->get())); return $panels; } @@ -558,7 +558,7 @@ protected function getPanelCard( return $ui_factory->card() ->standard($svy_type_title) ->withSections( - array($ui_factory->legacy()->legacyContent($card_table_tpl->get())) + array($ui_factory->legacy()->content($card_table_tpl->get())) ); } } diff --git a/components/ILIAS/Tagging/GlobalScreen/classes/TaggingMainBarProvider.php b/components/ILIAS/Tagging/GlobalScreen/classes/TaggingMainBarProvider.php index e108212860b6..24361423b830 100755 --- a/components/ILIAS/Tagging/GlobalScreen/classes/TaggingMainBarProvider.php +++ b/components/ILIAS/Tagging/GlobalScreen/classes/TaggingMainBarProvider.php @@ -60,7 +60,7 @@ public function getStaticSubItems(): array ->withContentWrapper(function () { $tag_ui = new \ilTaggingSlateContentGUI(); - return $this->dic->ui()->factory()->legacy()->legacyContent($tag_ui->render()); + return $this->dic->ui()->factory()->legacy()->content($tag_ui->render()); }) ->withParent(StandardTopItemsProvider::getInstance()->getPersonalWorkspaceIdentification()) ->withPosition(20), diff --git a/components/ILIAS/Tagging/classes/class.ilTaggingGUI.php b/components/ILIAS/Tagging/classes/class.ilTaggingGUI.php index 5ceeeb72ca8d..4670687f0d35 100755 --- a/components/ILIAS/Tagging/classes/class.ilTaggingGUI.php +++ b/components/ILIAS/Tagging/classes/class.ilTaggingGUI.php @@ -292,7 +292,7 @@ public static function getModalTemplate(): array global $DIC; $ui = $DIC->ui(); - $modal = $ui->factory()->modal()->roundtrip('#tag_title#', $ui->factory()->legacy()->legacyContent('')); + $modal = $ui->factory()->modal()->roundtrip('#tag_title#', $ui->factory()->legacy()->content('')); $modalt["show"] = $modal->getShowSignal()->getId(); $modalt["close"] = $modal->getCloseSignal()->getId(); $modalt["template"] = $ui->renderer()->renderAsync($modal); diff --git a/components/ILIAS/Taxonomy/GlobalScreen/classes/class.ilTaxonomyGSToolProvider.php b/components/ILIAS/Taxonomy/GlobalScreen/classes/class.ilTaxonomyGSToolProvider.php index 52b7a0c2d325..50ad1e4e43ea 100755 --- a/components/ILIAS/Taxonomy/GlobalScreen/classes/class.ilTaxonomyGSToolProvider.php +++ b/components/ILIAS/Taxonomy/GlobalScreen/classes/class.ilTaxonomyGSToolProvider.php @@ -45,12 +45,12 @@ public function getToolsForContextStack(CalledContexts $called_contexts): array ): \ILIAS\GlobalScreen\Identification\IdentificationInterface => $this->identification_provider->contextAwareIdentifier($id); $l = fn( string $content - ): \ILIAS\UI\Component\Legacy\LegacyContent => $this->dic->ui()->factory()->legacy()->legacyContent($content); + ): \ILIAS\UI\Component\Legacy\Content => $this->dic->ui()->factory()->legacy()->content($content); $tools[] = $this->factory->tool($iff("tree")) ->withTitle($title) ->withSymbol($icon) ->withContentWrapper(fn( - ): \ILIAS\UI\Component\Legacy\LegacyContent => $l($this->getEditTree( + ): \ILIAS\UI\Component\Legacy\Content => $l($this->getEditTree( $additional_data->get(self::TAX_TREE_GUI_PATH), $additional_data->get(self::TAX_ID), $additional_data->get(self::TAX_TREE_CMD), diff --git a/components/ILIAS/Test/classes/class.ilObjTestGUI.php b/components/ILIAS/Test/classes/class.ilObjTestGUI.php index 3fe8ffaf9b24..abdb8da6669b 100755 --- a/components/ILIAS/Test/classes/class.ilObjTestGUI.php +++ b/components/ILIAS/Test/classes/class.ilObjTestGUI.php @@ -1362,7 +1362,7 @@ protected function importFile(string $file_to_import, string $path_to_uploaded_f $panel = $this->ui_factory->panel()->standard( $this->lng->txt('import_tst'), [ - $this->ui_factory->legacy()->legacyContent($this->lng->txt('qpl_import_verify_found_questions')), + $this->ui_factory->legacy()->content($this->lng->txt('qpl_import_verify_found_questions')), $form ] ); diff --git a/components/ILIAS/Test/classes/class.ilTestEvaluationGUI.php b/components/ILIAS/Test/classes/class.ilTestEvaluationGUI.php index 0f5d73ce6a7c..a03a42cd4bf2 100755 --- a/components/ILIAS/Test/classes/class.ilTestEvaluationGUI.php +++ b/components/ILIAS/Test/classes/class.ilTestEvaluationGUI.php @@ -217,7 +217,7 @@ public function showResults() $content[] = $this->ui_factory->panel()->sub( $this->buildResultsTitle($fullname, $attempt_id), [ - $this->ui_factory->legacy()->legacyContent(''), + $this->ui_factory->legacy()->content(''), $attempt_overview, $attempt_details ] diff --git a/components/ILIAS/Test/classes/class.ilTestToplistGUI.php b/components/ILIAS/Test/classes/class.ilTestToplistGUI.php index 05f9af158f64..43f10133a9d7 100755 --- a/components/ILIAS/Test/classes/class.ilTestToplistGUI.php +++ b/components/ILIAS/Test/classes/class.ilTestToplistGUI.php @@ -92,7 +92,7 @@ protected function buildMedianMarkPanel(): Panel return $this->ui_factory->panel()->standard( $title, - $this->ui_factory->legacy()->legacyContent($content) + $this->ui_factory->legacy()->content($content) ); } diff --git a/components/ILIAS/Test/src/Logging/TestError.php b/components/ILIAS/Test/src/Logging/TestError.php index 57e606103be0..a102e6b1f32a 100644 --- a/components/ILIAS/Test/src/Logging/TestError.php +++ b/components/ILIAS/Test/src/Logging/TestError.php @@ -22,7 +22,7 @@ use ILIAS\Test\Utilities\TitleColumnsBuilder; use ILIAS\UI\Factory as UIFactory; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; use ILIAS\UI\Component\Table\DataRowBuilder; use ILIAS\UI\Component\Table\DataRow; @@ -118,8 +118,8 @@ public function getParsedAdditionalInformation( AdditionalInformationGenerator $additional_info, UIFactory $ui_factory, array $environment - ): LegacyContent { - return $ui_factory->legacy()->legacyContent($this->error_message); + ): Content { + return $ui_factory->legacy()->content($this->error_message); } public function toStorage(): array diff --git a/components/ILIAS/Test/src/Logging/TestUserInteraction.php b/components/ILIAS/Test/src/Logging/TestUserInteraction.php index 7f5c5895a022..65423f81cd74 100644 --- a/components/ILIAS/Test/src/Logging/TestUserInteraction.php +++ b/components/ILIAS/Test/src/Logging/TestUserInteraction.php @@ -21,7 +21,7 @@ use ILIAS\Test\Utilities\TitleColumnsBuilder; use ILIAS\UI\Factory as UIFactory; use ILIAS\UI\Component\Listing\Descriptive as DescriptiveListing; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; use ILIAS\UI\Component\Table\DataRowBuilder; use ILIAS\UI\Component\Table\DataRow; @@ -47,6 +47,6 @@ public function getParsedAdditionalInformation( AdditionalInformationGenerator $additional_info, UIFactory $ui_factory, array $environment - ): DescriptiveListing|LegacyContent; + ): DescriptiveListing|Content; public function toStorage(): array; } diff --git a/components/ILIAS/Test/src/Presentation/class.TestScreenGUI.php b/components/ILIAS/Test/src/Presentation/class.TestScreenGUI.php index f0c645cf17c1..f08b7e8703f3 100755 --- a/components/ILIAS/Test/src/Presentation/class.TestScreenGUI.php +++ b/components/ILIAS/Test/src/Presentation/class.TestScreenGUI.php @@ -188,7 +188,7 @@ private function handleRenderIntroduction(array $elements): array ) { $elements[] = $this->ui_factory->panel()->standard( $this->lng->txt('tst_introduction'), - $this->ui_factory->legacy()->legacyContent($introduction), + $this->ui_factory->legacy()->content($introduction), ); } diff --git a/components/ILIAS/Test/src/Results/Data/Factory.php b/components/ILIAS/Test/src/Results/Data/Factory.php index 246358279d49..d6086eb34d56 100644 --- a/components/ILIAS/Test/src/Results/Data/Factory.php +++ b/components/ILIAS/Test/src/Results/Data/Factory.php @@ -283,8 +283,8 @@ private function buildAttemptResults( ); if ($show_question_only) { - $usr_solution = $this->ui_renderer->render($this->ui_factory->legacy()->legacyContent('
' . $usr_solution . '
')); - $best_solution = $this->ui_renderer->render($this->ui_factory->legacy()->legacyContent('
' . $best_solution . '
')); + $usr_solution = $this->ui_renderer->render($this->ui_factory->legacy()->content('
' . $usr_solution . '
')); + $best_solution = $this->ui_renderer->render($this->ui_factory->legacy()->content('
' . $best_solution . '
')); } $feedback = $question_gui->getGenericFeedbackOutput($active_id, $attempt_id); diff --git a/components/ILIAS/TestQuestionPool/classes/class.ilBulkEditQuestionsGUI.php b/components/ILIAS/TestQuestionPool/classes/class.ilBulkEditQuestionsGUI.php index 9d5b0bf5e4bc..4178685ae116 100644 --- a/components/ILIAS/TestQuestionPool/classes/class.ilBulkEditQuestionsGUI.php +++ b/components/ILIAS/TestQuestionPool/classes/class.ilBulkEditQuestionsGUI.php @@ -94,7 +94,7 @@ public function executeCommand(): void break; case self::CMD_EDITTAXONOMIES: - $out[] = $this->ui_factory->legacy()->legacyContent($this->getFormTaxonomies()->getHTML()); + $out[] = $this->ui_factory->legacy()->content($this->getFormTaxonomies()->getHTML()); break; case self::CMD_SAVETAXONOMIES: case self::CMD_SAVETAXONOMIESADD: diff --git a/components/ILIAS/TestQuestionPool/classes/class.ilObjQuestionPoolGUI.php b/components/ILIAS/TestQuestionPool/classes/class.ilObjQuestionPoolGUI.php index e2ec9998ee3a..e17673e20c58 100755 --- a/components/ILIAS/TestQuestionPool/classes/class.ilObjQuestionPoolGUI.php +++ b/components/ILIAS/TestQuestionPool/classes/class.ilObjQuestionPoolGUI.php @@ -1371,7 +1371,7 @@ protected function importQuestionsFile(string $path_to_uploaded_file_in_temp_dir $panel = $this->ui_factory->panel()->standard( $this->lng->txt('import_question'), [ - $this->ui_factory->legacy()->legacyContent($this->lng->txt('qpl_import_verify_found_questions')), + $this->ui_factory->legacy()->content($this->lng->txt('qpl_import_verify_found_questions')), $form ] ); @@ -1414,7 +1414,7 @@ protected function importFile(string $file_to_import, string $path_to_uploaded_f $panel = $this->ui_factory->panel()->standard( $this->lng->txt('import_qpl'), [ - $this->ui_factory->legacy()->legacyContent($this->lng->txt('qpl_import_verify_found_questions')), + $this->ui_factory->legacy()->content($this->lng->txt('qpl_import_verify_found_questions')), $form ] ); diff --git a/components/ILIAS/Tracking/classes/Provider/LPMainBarProvider.php b/components/ILIAS/Tracking/classes/Provider/LPMainBarProvider.php index f56f46d0dd25..c81b6a86e6ed 100755 --- a/components/ILIAS/Tracking/classes/Provider/LPMainBarProvider.php +++ b/components/ILIAS/Tracking/classes/Provider/LPMainBarProvider.php @@ -55,7 +55,7 @@ public function getStaticSubItems(): array ->withPosition(30) ->withSymbol($icon) ->withNonAvailableReason( - $this->dic->ui()->factory()->legacy()->legacyContent( + $this->dic->ui()->factory()->legacy()->content( "{$this->dic->language()->txt('component_not_active')}" ) ) diff --git a/components/ILIAS/Tracking/classes/class.ilLearningProgressBaseGUI.php b/components/ILIAS/Tracking/classes/class.ilLearningProgressBaseGUI.php index e684ea10ecb9..f27eaaf6f893 100755 --- a/components/ILIAS/Tracking/classes/class.ilLearningProgressBaseGUI.php +++ b/components/ILIAS/Tracking/classes/class.ilLearningProgressBaseGUI.php @@ -595,7 +595,7 @@ public function __getLegendHTML(int $variant = ilLPStatusIcons::ICON_VARIANT_LON $panel = $this->ui_factory->panel()->secondary()->legacy( '', - $this->ui_factory->legacy()->legacyContent($tpl->get()) + $this->ui_factory->legacy()->content($tpl->get()) ); return $this->ui_renderer->render($panel); diff --git a/components/ILIAS/Tracking/classes/repository_statistics/class.ilLPListOfSettingsGUI.php b/components/ILIAS/Tracking/classes/repository_statistics/class.ilLPListOfSettingsGUI.php index 540b190ade6f..28fc13fbe340 100755 --- a/components/ILIAS/Tracking/classes/repository_statistics/class.ilLPListOfSettingsGUI.php +++ b/components/ILIAS/Tracking/classes/repository_statistics/class.ilLPListOfSettingsGUI.php @@ -578,7 +578,7 @@ protected function handleLPUsageInfo(): string $panel = $this->ui_factory->panel()->secondary()->legacy( $this->lng->txt("trac_lp_settings_info_parent_container"), - $this->ui_factory->legacy()->legacyContent($tpl->get()) + $this->ui_factory->legacy()->content($tpl->get()) ); return $this->ui_renderer->render($panel); diff --git a/components/ILIAS/UI/README.md b/components/ILIAS/UI/README.md index a2d7c45daa5b..63dd517b8385 100755 --- a/components/ILIAS/UI/README.md +++ b/components/ILIAS/UI/README.md @@ -545,7 +545,7 @@ This code snippet shows how to open a modal by clicking on a button: ```php global $DIC; $factory = $DIC->ui()->factory(); -$modal = $factory->modal()->roundtrip('Title', $factory->legacy()->legacyContent('Hello World')); +$modal = $factory->modal()->roundtrip('Title', $factory->legacy()->content('Hello World')); $button = $factory->button()->standard('Open Modal', '#') ->withOnClick($modal->getShowSignal()); ``` @@ -560,7 +560,7 @@ This means that a cloned component may trigger the same signals as the original. ```php global $DIC; $factory = $DIC->ui()->factory(); -$modal = $factory->modal()->roundtrip('Title', $factory->legacy()->legacyContent('Hello World')); +$modal = $factory->modal()->roundtrip('Title', $factory->legacy()->content('Hello World')); $button1 = $factory->button()->standard('Open Modal', '#') ->withOnClick($modal->getShowSignal()); $button2 = $button1->withLabel('Open the same Modal'); diff --git a/components/ILIAS/UI/src/Component/Entity/Entity.php b/components/ILIAS/UI/src/Component/Entity/Entity.php index f2b7981466c1..1fd4b1140b26 100755 --- a/components/ILIAS/UI/src/Component/Entity/Entity.php +++ b/components/ILIAS/UI/src/Component/Entity/Entity.php @@ -26,7 +26,7 @@ use ILIAS\UI\Component\Symbol\Glyph\Glyph; use ILIAS\UI\Component\Button\Shy; use ILIAS\UI\Component\Button\Tag; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; use ILIAS\UI\Component\Listing\Property as PropertyListing; use ILIAS\UI\Component\Link\Standard as StandardLink; @@ -42,7 +42,7 @@ interface Entity extends Component * some access restriction for the user on this object. */ public function withBlockingAvailabilityConditions( - PropertyListing | StandardLink | LegacyContent ...$blocking_conditions + PropertyListing | StandardLink | Content ...$blocking_conditions ): self; /** @@ -52,7 +52,7 @@ public function withBlockingAvailabilityConditions( * place. */ public function withFeaturedProperties( - PropertyListing | StandardLink | LegacyContent ...$featured_props + PropertyListing | StandardLink | Content ...$featured_props ): self; /** @@ -60,7 +60,7 @@ public function withFeaturedProperties( * "Description" would be one of the most prominent examples. */ public function withMainDetails( - PropertyListing | LegacyContent ...$main_details + PropertyListing | Content ...$main_details ): self; /** @@ -86,7 +86,7 @@ public function withReactions(Glyph | Tag ...$reactions): self; * you should place them into Blocking Availability Conditions. */ public function withAvailability( - PropertyListing | StandardLink | LegacyContent ...$availability + PropertyListing | StandardLink | Content ...$availability ): self; /** @@ -94,7 +94,7 @@ public function withAvailability( * but not as significantly important than Main Details or Featured Properties. */ public function withDetails( - PropertyListing | LegacyContent ...$details + PropertyListing | Content ...$details ): self; /** @@ -109,6 +109,6 @@ public function withActions(Shy ...$actions): self; * the learning Progress of a Course. */ public function withPersonalStatus( - PropertyListing | LegacyContent ...$personal_status + PropertyListing | Content ...$personal_status ): self; } diff --git a/components/ILIAS/UI/src/Component/Item/Notification.php b/components/ILIAS/UI/src/Component/Item/Notification.php index d1ece4de1041..fd99926ac161 100755 --- a/components/ILIAS/UI/src/Component/Item/Notification.php +++ b/components/ILIAS/UI/src/Component/Item/Notification.php @@ -20,7 +20,7 @@ namespace ILIAS\UI\Component\Item; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; use ILIAS\UI\Component\Symbol\Icon\Icon; use ILIAS\UI\Component\Dropdown\Standard as DropdownStandard; @@ -36,12 +36,12 @@ interface Notification extends Item * needs to hold legacy content that currently does not have a place in the * UI components. */ - public function withAdditionalContent(LegacyContent $component): Notification; + public function withAdditionalContent(Content $component): Notification; /** * Get the additional content of the item or null. */ - public function getAdditionalContent(): ?LegacyContent; + public function getAdditionalContent(): ?Content; /** * Get an Item like this with an url to consulted async, when to close button is pressed. diff --git a/components/ILIAS/UI/src/Component/Legacy/Factory.php b/components/ILIAS/UI/src/Component/Legacy/Factory.php index 4a5417c2fdfd..90eef2bd16c2 100755 --- a/components/ILIAS/UI/src/Component/Legacy/Factory.php +++ b/components/ILIAS/UI/src/Component/Legacy/Factory.php @@ -43,8 +43,8 @@ interface Factory * using other UI Components. * --- * @param string $content the content of the legacy component - * @return \ILIAS\UI\Component\Legacy\LegacyContent + * @return \ILIAS\UI\Component\Legacy\Content */ - public function legacyContent(string $content): LegacyContent; + public function content(string $content): Content; } diff --git a/components/ILIAS/UI/src/Component/Legacy/LegacyContent.php b/components/ILIAS/UI/src/Component/Legacy/LegacyContent.php index e0c2fcb7b680..ed2c61c54ef5 100644 --- a/components/ILIAS/UI/src/Component/Legacy/LegacyContent.php +++ b/components/ILIAS/UI/src/Component/Legacy/LegacyContent.php @@ -29,7 +29,7 @@ * Interface Legacy * @package ILIAS\UI\Component\Legacy */ -interface LegacyContent extends Component, JavaScriptBindable, Block +interface Content extends Component, JavaScriptBindable, Block { /** * Get content as string stored in this component. diff --git a/components/ILIAS/UI/src/Component/Listing/Property.php b/components/ILIAS/UI/src/Component/Listing/Property.php index fa56c4df5950..3929f6d8b89d 100755 --- a/components/ILIAS/UI/src/Component/Listing/Property.php +++ b/components/ILIAS/UI/src/Component/Listing/Property.php @@ -21,7 +21,7 @@ namespace ILIAS\UI\Component\Listing; use ILIAS\UI\Component\Symbol\Symbol; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; use ILIAS\UI\Component\Link\Standard as StandardLink; /** @@ -32,7 +32,7 @@ interface Property extends Listing { public function withProperty( string $label, - string | Symbol | LegacyContent | StandardLink $value, + string | Symbol | Content | StandardLink $value, bool $show_label = true ): self; } diff --git a/components/ILIAS/UI/src/Component/MainControls/Slate/Factory.php b/components/ILIAS/UI/src/Component/MainControls/Slate/Factory.php index 901b86ca797f..3061abd6d745 100755 --- a/components/ILIAS/UI/src/Component/MainControls/Slate/Factory.php +++ b/components/ILIAS/UI/src/Component/MainControls/Slate/Factory.php @@ -47,13 +47,13 @@ interface Factory * ---- * @param string $name * @param \ILIAS\UI\Component\Symbol\Symbol $symbol - * @param \ILIAS\UI\Component\Legacy\LegacyContent $content + * @param \ILIAS\UI\Component\Legacy\Content $content * @return \ILIAS\UI\Component\MainControls\Slate\Legacy */ public function legacy( string $name, Symbol $symbol, - \ILIAS\UI\Component\Legacy\LegacyContent $content + \ILIAS\UI\Component\Legacy\Content $content ): Legacy; diff --git a/components/ILIAS/UI/src/Component/Panel/Secondary/Factory.php b/components/ILIAS/UI/src/Component/Panel/Secondary/Factory.php index beb49e6ced85..2557f64c3328 100755 --- a/components/ILIAS/UI/src/Component/Panel/Secondary/Factory.php +++ b/components/ILIAS/UI/src/Component/Panel/Secondary/Factory.php @@ -61,8 +61,8 @@ public function listing(string $title, array $item_groups): Component\Panel\Seco * * --- * @param string $title - * @param \ILIAS\UI\Component\Legacy\LegacyContent $legacy + * @param \ILIAS\UI\Component\Legacy\Content $legacy * @return \ILIAS\UI\Component\Panel\Secondary\Legacy */ - public function legacy(string $title, Component\Legacy\LegacyContent $legacy): Component\Panel\Secondary\Legacy; + public function legacy(string $title, Component\Legacy\Content $legacy): Component\Panel\Secondary\Legacy; } diff --git a/components/ILIAS/UI/src/Component/Panel/Secondary/Legacy.php b/components/ILIAS/UI/src/Component/Panel/Secondary/Legacy.php index c1dfc1dbeb1a..a1c109b5a580 100755 --- a/components/ILIAS/UI/src/Component/Panel/Secondary/Legacy.php +++ b/components/ILIAS/UI/src/Component/Panel/Secondary/Legacy.php @@ -31,5 +31,5 @@ interface Legacy extends Secondary /** * Get item list */ - public function getLegacyComponent(): Component\Legacy\LegacyContent; + public function getLegacyComponent(): Component\Legacy\Content; } diff --git a/components/ILIAS/UI/src/Implementation/Component/Entity/Entity.php b/components/ILIAS/UI/src/Implementation/Component/Entity/Entity.php index 6bd6e15f520d..ad0020d42a9b 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Entity/Entity.php +++ b/components/ILIAS/UI/src/Implementation/Component/Entity/Entity.php @@ -26,7 +26,7 @@ use ILIAS\UI\Component\Symbol\Glyph\Glyph; use ILIAS\UI\Component\Button\Shy; use ILIAS\UI\Component\Button\Tag; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; use ILIAS\UI\Component\Listing\Property as PropertyListing; use ILIAS\UI\Component\Link\Standard as StandardLink; use ILIAS\UI\Implementation\Component\ComponentHelper; @@ -36,15 +36,15 @@ abstract class Entity implements I\Entity use ComponentHelper; /** - * @var array + * @var array */ protected array $blocking_conditions = []; /** - * @var array + * @var array */ protected array $featured_props = []; /** - * @var array + * @var array */ protected array $main_details = []; /** @@ -56,11 +56,11 @@ abstract class Entity implements I\Entity */ protected array $reactions = []; /** - * @var array + * @var array */ protected array $availability = []; /** - * @var array + * @var array */ protected array $details = []; /** @@ -68,7 +68,7 @@ abstract class Entity implements I\Entity */ protected array $actions = []; /** - * @var array + * @var array */ protected array $personal_status = []; @@ -104,14 +104,14 @@ public function getSecondaryIdentifier(): Symbol | Image | Shy | StandardLink | * @inheritdoc */ public function withBlockingAvailabilityConditions( - PropertyListing | StandardLink | LegacyContent ...$blocking_conditions + PropertyListing | StandardLink | Content ...$blocking_conditions ): self { $clone = clone $this; $clone->blocking_conditions = $blocking_conditions; return $clone; } /** - * @return array + * @return array */ public function getBlockingAvailabilityConditions(): array { @@ -122,14 +122,14 @@ public function getBlockingAvailabilityConditions(): array * @inheritdoc */ public function withFeaturedProperties( - PropertyListing | StandardLink | LegacyContent ...$featured_props + PropertyListing | StandardLink | Content ...$featured_props ): self { $clone = clone $this; $clone->featured_props = $featured_props; return $clone; } /** - * @return array + * @return array */ public function getFeaturedProperties(): array { @@ -140,14 +140,14 @@ public function getFeaturedProperties(): array * @inheritdoc */ public function withMainDetails( - PropertyListing | LegacyContent ...$main_details + PropertyListing | Content ...$main_details ): self { $clone = clone $this; $clone->main_details = $main_details; return $clone; } /** - * @return array + * @return array */ public function getMainDetails(): array { @@ -203,14 +203,14 @@ public function getReactions(): array * @inheritdoc */ public function withAvailability( - PropertyListing | StandardLink | LegacyContent ...$availability + PropertyListing | StandardLink | Content ...$availability ): self { $clone = clone $this; $clone->availability = $availability; return $clone; } /** - * @return array + * @return array */ public function getAvailability(): array { @@ -221,14 +221,14 @@ public function getAvailability(): array * @inheritdoc */ public function withDetails( - PropertyListing | LegacyContent ...$details + PropertyListing | Content ...$details ): self { $clone = clone $this; $clone->details = $details; return $clone; } /** - * @return array + * @return array */ public function getDetails(): array { @@ -256,14 +256,14 @@ public function getActions(): array * @inheritdoc */ public function withPersonalStatus( - PropertyListing | LegacyContent ...$personal_status + PropertyListing | Content ...$personal_status ): self { $clone = clone $this; $clone->personal_status = $personal_status; return $clone; } /** - * @return array + * @return array */ public function getPersonalStatus(): array { diff --git a/components/ILIAS/UI/src/Implementation/Component/Input/Field/FilterContextRenderer.php b/components/ILIAS/UI/src/Implementation/Component/Input/Field/FilterContextRenderer.php index 66f2a179584f..2716b06e1085 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Input/Field/FilterContextRenderer.php +++ b/components/ILIAS/UI/src/Implementation/Component/Input/Field/FilterContextRenderer.php @@ -108,7 +108,7 @@ protected function renderAddField(array $input_labels, RendererInterface $defaul });"); } $add_tpl->setVariable("LIST", $default_renderer->render($f->listing()->unordered($links))); - $list = $f->legacy()->legacyContent($add_tpl->get()); + $list = $f->legacy()->content($add_tpl->get()); $popover = $f->popover()->standard($list)->withVerticalPosition(); $tpl->setVariable("POPOVER", $default_renderer->render($popover)); $add = $f->button()->bulky($f->symbol()->glyph()->add(), "", "")->withOnClick($popover->getShowSignal()); @@ -182,7 +182,7 @@ protected function renderProxyField( $f = $this->getUIFactory(); $tpl = $this->getTemplate("tpl.filter_field.html", true, true); - $popover = $f->popover()->standard($f->legacy()->legacyContent($input_html))->withVerticalPosition(); + $popover = $f->popover()->standard($f->legacy()->content($input_html))->withVerticalPosition(); $tpl->setVariable("POPOVER", $default_renderer->render($popover)); $prox = new ProxyFilterField(); diff --git a/components/ILIAS/UI/src/Implementation/Component/Item/Notification.php b/components/ILIAS/UI/src/Implementation/Component/Item/Notification.php index e8ed78ad20d7..e8cad50c831d 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Item/Notification.php +++ b/components/ILIAS/UI/src/Implementation/Component/Item/Notification.php @@ -21,7 +21,7 @@ namespace ILIAS\UI\Implementation\Component\Item; use ILIAS\UI\Component\Item\Notification as INotification; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; use ILIAS\UI\Implementation\Component\JavaScriptBindable; use ILIAS\UI\Component\JavaScriptBindable as IJavaScriptBindable; use ILIAS\UI\Component\Symbol\Icon\Icon; @@ -33,7 +33,7 @@ class Notification extends Item implements INotification, IJavaScriptBindable { use JavaScriptBindable; - protected ?LegacyContent $additional_content = null; + protected ?Content $additional_content = null; protected Icon $lead_icon; protected ?string $close_action = null; @@ -55,7 +55,7 @@ public function __construct($title, Icon $icon) /** * @inheritdoc */ - public function withAdditionalContent(LegacyContent $additional_content): INotification + public function withAdditionalContent(Content $additional_content): INotification { $clone = clone $this; $clone->additional_content = $additional_content; @@ -65,7 +65,7 @@ public function withAdditionalContent(LegacyContent $additional_content): INotif /** * @inheritdoc */ - public function getAdditionalContent(): ?LegacyContent + public function getAdditionalContent(): ?Content { return $this->additional_content; } diff --git a/components/ILIAS/UI/src/Implementation/Component/Legacy/Factory.php b/components/ILIAS/UI/src/Implementation/Component/Legacy/Factory.php index 4701fc304257..70ba4e064a22 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Legacy/Factory.php +++ b/components/ILIAS/UI/src/Implementation/Component/Legacy/Factory.php @@ -35,8 +35,8 @@ public function __construct(SignalGeneratorInterface $signal_generator) /** * @inheritdoc */ - public function legacyContent(string $content): C\Legacy\LegacyContent + public function content(string $content): C\Legacy\Content { - return new LegacyContent($content, $this->signal_generator); + return new Content($content, $this->signal_generator); } } diff --git a/components/ILIAS/UI/src/Implementation/Component/Legacy/LegacyContent.php b/components/ILIAS/UI/src/Implementation/Component/Legacy/LegacyContent.php index cf38380c733f..77a1b4420579 100644 --- a/components/ILIAS/UI/src/Implementation/Component/Legacy/LegacyContent.php +++ b/components/ILIAS/UI/src/Implementation/Component/Legacy/LegacyContent.php @@ -28,10 +28,10 @@ use InvalidArgumentException; /** - * Class LegacyContent + * Class Content * @package ILIAS\UI\Implementation\Component\Legacy */ -class LegacyContent implements C\Legacy\LegacyContent +class Content implements C\Legacy\Content { use ComponentHelper; use JavaScriptBindable; diff --git a/components/ILIAS/UI/src/Implementation/Component/Legacy/Renderer.php b/components/ILIAS/UI/src/Implementation/Component/Legacy/Renderer.php index aab81bc60406..b3ae63412ebd 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Legacy/Renderer.php +++ b/components/ILIAS/UI/src/Implementation/Component/Legacy/Renderer.php @@ -35,7 +35,7 @@ class Renderer extends AbstractComponentRenderer */ public function render(Component\Component $component, RendererInterface $default_renderer): string { - if (!$component instanceof Component\Legacy\LegacyContent) { + if (!$component instanceof Component\Legacy\Content) { $this->cannotHandleComponent($component); } @@ -44,7 +44,7 @@ public function render(Component\Component $component, RendererInterface $defaul return $component->getContent(); } - protected function registerSignals(LegacyContent $component): Component\JavaScriptBindable + protected function registerSignals(Content $component): Component\JavaScriptBindable { $custom_signals = $component->getAllCustomSignals(); diff --git a/components/ILIAS/UI/src/Implementation/Component/Listing/Property.php b/components/ILIAS/UI/src/Implementation/Component/Listing/Property.php index fc87ef2cdfda..8b6333444355 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Listing/Property.php +++ b/components/ILIAS/UI/src/Implementation/Component/Listing/Property.php @@ -22,7 +22,7 @@ use ILIAS\UI\Component\Listing as IListing; use ILIAS\UI\Component\Symbol\Symbol; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; use ILIAS\UI\Component\Link\Standard as StandardLink; use ILIAS\UI\Implementation\Component\ComponentHelper; @@ -35,7 +35,7 @@ class Property extends Listing implements IListing\Property use ComponentHelper; protected const ALLOWED_VALUE_TYPES = [ Symbol::class, - LegacyContent::class, + Content::class, StandardLink::class ]; @@ -59,7 +59,7 @@ public function withItems(array $items): self public function withProperty( string $label, - string | Symbol | LegacyContent | StandardLink $value, + string | Symbol | Content | StandardLink $value, bool $show_label = true ): self { if (is_array($value)) { diff --git a/components/ILIAS/UI/src/Implementation/Component/MainControls/Slate/Factory.php b/components/ILIAS/UI/src/Implementation/Component/MainControls/Slate/Factory.php index 87f281c70d44..75786e6adad1 100755 --- a/components/ILIAS/UI/src/Implementation/Component/MainControls/Slate/Factory.php +++ b/components/ILIAS/UI/src/Implementation/Component/MainControls/Slate/Factory.php @@ -21,7 +21,7 @@ namespace ILIAS\UI\Implementation\Component\MainControls\Slate; use ILIAS\UI\Component\MainControls\Slate as ISlate; -use ILIAS\UI\Component\Legacy\LegacyContent as ILegacy; +use ILIAS\UI\Component\Legacy\Content as ILegacy; use ILIAS\UI\Implementation\Component\SignalGeneratorInterface; use ILIAS\UI\Component\Counter\Factory as CounterFactory; use ILIAS\UI\Component\Symbol\Symbol; diff --git a/components/ILIAS/UI/src/Implementation/Component/MainControls/Slate/Legacy.php b/components/ILIAS/UI/src/Implementation/Component/MainControls/Slate/Legacy.php index ccac15a3c5cb..8d14c8c2e00b 100755 --- a/components/ILIAS/UI/src/Implementation/Component/MainControls/Slate/Legacy.php +++ b/components/ILIAS/UI/src/Implementation/Component/MainControls/Slate/Legacy.php @@ -21,7 +21,7 @@ namespace ILIAS\UI\Implementation\Component\MainControls\Slate; use ILIAS\UI\Component\MainControls\Slate as ISlate; -use ILIAS\UI\Component\Legacy\LegacyContent as ILegacy; +use ILIAS\UI\Component\Legacy\Content as ILegacy; use ILIAS\UI\Component\Symbol\Symbol; use ILIAS\UI\Implementation\Component\SignalGeneratorInterface; use ILIAS\UI\Component\Component; diff --git a/components/ILIAS/UI/src/Implementation/Component/Modal/LightboxTextPage.php b/components/ILIAS/UI/src/Implementation/Component/Modal/LightboxTextPage.php index 5e2bace60020..dd1c14df409e 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Modal/LightboxTextPage.php +++ b/components/ILIAS/UI/src/Implementation/Component/Modal/LightboxTextPage.php @@ -23,7 +23,7 @@ use ILIAS\UI\Component as C; use ILIAS\UI\Component\Modal\LightboxPage; use ILIAS\UI\Implementation\Component\ComponentHelper; -use ILIAS\UI\Implementation\Component\Legacy\LegacyContent; +use ILIAS\UI\Implementation\Component\Legacy\Content; use ILIAS\UI\Implementation\Component\SignalGenerator; use ILIAS\UI\Component\Modal\LightboxTextPage as ILightboxTextPage; @@ -56,8 +56,8 @@ public function getTitle(): string /** * @inheritdoc */ - public function getComponent(): C\Legacy\LegacyContent + public function getComponent(): C\Legacy\Content { - return new LegacyContent($this->text, new SignalGenerator()); + return new Content($this->text, new SignalGenerator()); } } diff --git a/components/ILIAS/UI/src/Implementation/Component/Panel/Secondary/Factory.php b/components/ILIAS/UI/src/Implementation/Component/Panel/Secondary/Factory.php index 30fd064e0771..dbf2ac6753f0 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Panel/Secondary/Factory.php +++ b/components/ILIAS/UI/src/Implementation/Component/Panel/Secondary/Factory.php @@ -39,7 +39,7 @@ public function listing(string $title, array $item_groups): C\Panel\Secondary\Li /** * @inheritdoc */ - public function legacy(string $title, C\Legacy\LegacyContent $legacy): C\Panel\Secondary\Legacy + public function legacy(string $title, C\Legacy\Content $legacy): C\Panel\Secondary\Legacy { return new Legacy($title, $legacy); } diff --git a/components/ILIAS/UI/src/Implementation/Component/Panel/Secondary/Legacy.php b/components/ILIAS/UI/src/Implementation/Component/Panel/Secondary/Legacy.php index a49109a58c1b..9bfcba2abff8 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Panel/Secondary/Legacy.php +++ b/components/ILIAS/UI/src/Implementation/Component/Panel/Secondary/Legacy.php @@ -27,9 +27,9 @@ */ class Legacy extends Secondary implements C\Panel\Secondary\Legacy { - protected C\Legacy\LegacyContent $legacy; + protected C\Legacy\Content $legacy; - public function __construct(string $title, C\Legacy\LegacyContent $legacy) + public function __construct(string $title, C\Legacy\Content $legacy) { $this->title = $title; $this->legacy = $legacy; @@ -38,7 +38,7 @@ public function __construct(string $title, C\Legacy\LegacyContent $legacy) /** * @inheritdoc */ - public function getLegacyComponent(): C\Legacy\LegacyContent + public function getLegacyComponent(): C\Legacy\Content { return $this->legacy; } diff --git a/components/ILIAS/UI/src/examples/Button/Close/modal.php b/components/ILIAS/UI/src/examples/Button/Close/modal.php index da9aca9fa54d..ba1cb2b1f425 100755 --- a/components/ILIAS/UI/src/examples/Button/Close/modal.php +++ b/components/ILIAS/UI/src/examples/Button/Close/modal.php @@ -24,7 +24,7 @@ function modal() $modal = $factory->modal()->roundtrip( 'Close Button Demo', - $factory->legacy()->legacyContent('See the Close Button in the top right corner.') + $factory->legacy()->content('See the Close Button in the top right corner.') ); $button1 = $factory->button()->standard('Show Close Button Demo', '#') ->withOnClick($modal->getShowSignal()); diff --git a/components/ILIAS/UI/src/examples/Divider/Vertical/base.php b/components/ILIAS/UI/src/examples/Divider/Vertical/base.php index baef73be4143..3397b260714e 100755 --- a/components/ILIAS/UI/src/examples/Divider/Vertical/base.php +++ b/components/ILIAS/UI/src/examples/Divider/Vertical/base.php @@ -19,7 +19,7 @@ function base() $f = $DIC->ui()->factory(); $renderer = $DIC->ui()->renderer(); - return $renderer->render(array($f->legacy()->legacyContent("Some content"), + return $renderer->render(array($f->legacy()->content("Some content"), $f->divider()->vertical(), - $f->legacy()->legacyContent("More content"))); + $f->legacy()->content("More content"))); } diff --git a/components/ILIAS/UI/src/examples/Entity/Standard/base.php b/components/ILIAS/UI/src/examples/Entity/Standard/base.php index be8665e40db9..8edf9f1cec4e 100755 --- a/components/ILIAS/UI/src/examples/Entity/Standard/base.php +++ b/components/ILIAS/UI/src/examples/Entity/Standard/base.php @@ -80,7 +80,7 @@ function base() ->withProperty('Recording', 'recording available', false) ; - $status = $f->legacy()->legacyContent( + $status = $f->legacy()->content( $renderer->render($f->symbol()->icon()->custom('./assets/images/learning_progress/in_progress.svg', 'incomplete')) . ' in progress' ); diff --git a/components/ILIAS/UI/src/examples/Entity/Standard/semantic_groups.php b/components/ILIAS/UI/src/examples/Entity/Standard/semantic_groups.php index 5f79ac0f41ea..446d679789c3 100755 --- a/components/ILIAS/UI/src/examples/Entity/Standard/semantic_groups.php +++ b/components/ILIAS/UI/src/examples/Entity/Standard/semantic_groups.php @@ -17,12 +17,12 @@ function semantic_groups() $renderer = $DIC->ui()->renderer(); $entity = $f->entity()->standard('Primary Identifier', 'Secondary Identifier') - ->withBlockingAvailabilityConditions($f->legacy()->legacyContent('Blocking Conditions')) - ->withFeaturedProperties($f->legacy()->legacyContent('Featured_properties')) - ->withPersonalStatus($f->legacy()->legacyContent('Personal Status')) - ->withMainDetails($f->legacy()->legacyContent('Main Details')) - ->withAvailability($f->legacy()->legacyContent('Availability')) - ->withDetails($f->legacy()->legacyContent('Details')) + ->withBlockingAvailabilityConditions($f->legacy()->content('Blocking Conditions')) + ->withFeaturedProperties($f->legacy()->content('Featured_properties')) + ->withPersonalStatus($f->legacy()->content('Personal Status')) + ->withMainDetails($f->legacy()->content('Main Details')) + ->withAvailability($f->legacy()->content('Availability')) + ->withDetails($f->legacy()->content('Details')) ->withReactions($f->button()->tag('reaction', '#')) ->withPrioritizedReactions($f->symbol()->glyph()->like()) ->withActions($f->button()->shy('action', '#')) diff --git a/components/ILIAS/UI/src/examples/Input/Container/ViewControl/Standard/base.php b/components/ILIAS/UI/src/examples/Input/Container/ViewControl/Standard/base.php index abee3343b083..459c0637a23e 100755 --- a/components/ILIAS/UI/src/examples/Input/Container/ViewControl/Standard/base.php +++ b/components/ILIAS/UI/src/examples/Input/Container/ViewControl/Standard/base.php @@ -64,7 +64,7 @@ function base() ->withRequest($request); return $r->render([ - $f->legacy()->legacyContent('
' . print_r($vc_container->getData(), true) . '
'), + $f->legacy()->content('
' . print_r($vc_container->getData(), true) . '
'), $f->divider()->horizontal(), $vc_container ]); diff --git a/components/ILIAS/UI/src/examples/Input/ViewControl/FieldSelection/base.php b/components/ILIAS/UI/src/examples/Input/ViewControl/FieldSelection/base.php index 3fd86c24457f..6ba7a5faa9ac 100755 --- a/components/ILIAS/UI/src/examples/Input/ViewControl/FieldSelection/base.php +++ b/components/ILIAS/UI/src/examples/Input/ViewControl/FieldSelection/base.php @@ -32,7 +32,7 @@ function base() ->withRequest($DIC->http()->request()); return $r->render([ - $f->legacy()->legacyContent('
' . print_r($vc_container->getData(), true) . '
'), + $f->legacy()->content('
' . print_r($vc_container->getData(), true) . '
'), $f->divider()->horizontal(), $vc_container ]); diff --git a/components/ILIAS/UI/src/examples/Input/ViewControl/Group/base.php b/components/ILIAS/UI/src/examples/Input/ViewControl/Group/base.php index dbf13b72336a..f44195a00d40 100755 --- a/components/ILIAS/UI/src/examples/Input/ViewControl/Group/base.php +++ b/components/ILIAS/UI/src/examples/Input/ViewControl/Group/base.php @@ -42,7 +42,7 @@ function base(): string ); return $r->render([ - $f->legacy()->legacyContent('
' . print_r($vc_container->getData(), true) . '
'), + $f->legacy()->content('
' . print_r($vc_container->getData(), true) . '
'), $vc_container ]); } diff --git a/components/ILIAS/UI/src/examples/Input/ViewControl/NullControl/base.php b/components/ILIAS/UI/src/examples/Input/ViewControl/NullControl/base.php index df6d5126ea23..c0f3da4a38a0 100644 --- a/components/ILIAS/UI/src/examples/Input/ViewControl/NullControl/base.php +++ b/components/ILIAS/UI/src/examples/Input/ViewControl/NullControl/base.php @@ -24,7 +24,7 @@ function base() ->withRequest($DIC->http()->request()); return $r->render([ - $f->legacy()->legacyContent('
' . print_r($vc_container->getData(), true) . '
'), + $f->legacy()->content('
' . print_r($vc_container->getData(), true) . '
'), $f->divider()->horizontal(), $vc_container ]); diff --git a/components/ILIAS/UI/src/examples/Input/ViewControl/Pagination/base.php b/components/ILIAS/UI/src/examples/Input/ViewControl/Pagination/base.php index 3f6e8be0f560..2be5d714b042 100755 --- a/components/ILIAS/UI/src/examples/Input/ViewControl/Pagination/base.php +++ b/components/ILIAS/UI/src/examples/Input/ViewControl/Pagination/base.php @@ -28,7 +28,7 @@ function base() ->withRequest($DIC->http()->request()); return $r->render([ - $f->legacy()->legacyContent('
' . print_r($vc_container->getData(), true) . '
'), + $f->legacy()->content('
' . print_r($vc_container->getData(), true) . '
'), $f->divider()->horizontal(), $vc_container ]); diff --git a/components/ILIAS/UI/src/examples/Input/ViewControl/Pagination/with_one_page.php b/components/ILIAS/UI/src/examples/Input/ViewControl/Pagination/with_one_page.php index 19211b2cff5f..b498a81be2f7 100644 --- a/components/ILIAS/UI/src/examples/Input/ViewControl/Pagination/with_one_page.php +++ b/components/ILIAS/UI/src/examples/Input/ViewControl/Pagination/with_one_page.php @@ -28,7 +28,7 @@ function with_one_page() ->withRequest($DIC->http()->request()); return $r->render([ - $f->legacy()->legacyContent('
' . print_r($vc_container->getData(), true) . '
'), + $f->legacy()->content('
' . print_r($vc_container->getData(), true) . '
'), $f->divider()->horizontal(), $vc_container ]); diff --git a/components/ILIAS/UI/src/examples/Input/ViewControl/Sortation/base.php b/components/ILIAS/UI/src/examples/Input/ViewControl/Sortation/base.php index 14a5042ed0ab..45ee2c876dee 100755 --- a/components/ILIAS/UI/src/examples/Input/ViewControl/Sortation/base.php +++ b/components/ILIAS/UI/src/examples/Input/ViewControl/Sortation/base.php @@ -31,7 +31,7 @@ function base() ->withRequest($DIC->http()->request()); return $r->render([ - $f->legacy()->legacyContent('
' . print_r($vc_container->getData(), true) . '
'), + $f->legacy()->content('
' . print_r($vc_container->getData(), true) . '
'), $f->divider()->horizontal(), $vc_container ]); diff --git a/components/ILIAS/UI/src/examples/Layout/Alignment/Horizontal/DynamicallyDistributed/base.php b/components/ILIAS/UI/src/examples/Layout/Alignment/Horizontal/DynamicallyDistributed/base.php index 6416164b1302..9d92d886296a 100755 --- a/components/ILIAS/UI/src/examples/Layout/Alignment/Horizontal/DynamicallyDistributed/base.php +++ b/components/ILIAS/UI/src/examples/Layout/Alignment/Horizontal/DynamicallyDistributed/base.php @@ -19,9 +19,9 @@ function base() $tpl->addCss('assets/ui-examples/css/alignment_examples.css'); $blocks = [ - $ui_factory->legacy()->legacyContent('
Example Block
'), - $ui_factory->legacy()->legacyContent('
Another Example Block
'), - $ui_factory->legacy()->legacyContent('
And a third block is also part of this group
') + $ui_factory->legacy()->content('
Example Block
'), + $ui_factory->legacy()->content('
Another Example Block
'), + $ui_factory->legacy()->content('
And a third block is also part of this group
') ]; return $renderer->render( diff --git a/components/ILIAS/UI/src/examples/Layout/Alignment/Horizontal/DynamicallyDistributed/nested.php b/components/ILIAS/UI/src/examples/Layout/Alignment/Horizontal/DynamicallyDistributed/nested.php index 3d31f1bf549d..a80cf263e930 100755 --- a/components/ILIAS/UI/src/examples/Layout/Alignment/Horizontal/DynamicallyDistributed/nested.php +++ b/components/ILIAS/UI/src/examples/Layout/Alignment/Horizontal/DynamicallyDistributed/nested.php @@ -20,15 +20,15 @@ function nested() $blocks = [ - $ui_factory->legacy()->legacyContent('
D
'), - $ui_factory->legacy()->legacyContent('
E
'), - $ui_factory->legacy()->legacyContent('
F
') + $ui_factory->legacy()->content('
D
'), + $ui_factory->legacy()->content('
E
'), + $ui_factory->legacy()->content('
F
') ]; $aligned = $ui_factory->layout()->alignment()->horizontal()->dynamicallyDistributed( - $ui_factory->legacy()->legacyContent('
A
'), - $ui_factory->legacy()->legacyContent('
B
'), - $ui_factory->legacy()->legacyContent('
C
') + $ui_factory->legacy()->content('
A
'), + $ui_factory->legacy()->content('
B
'), + $ui_factory->legacy()->content('
C
') ); return $renderer->render( diff --git a/components/ILIAS/UI/src/examples/Layout/Alignment/Horizontal/EvenlyDistributed/base.php b/components/ILIAS/UI/src/examples/Layout/Alignment/Horizontal/EvenlyDistributed/base.php index b0e8c9491d8f..cbcde2ae1388 100755 --- a/components/ILIAS/UI/src/examples/Layout/Alignment/Horizontal/EvenlyDistributed/base.php +++ b/components/ILIAS/UI/src/examples/Layout/Alignment/Horizontal/EvenlyDistributed/base.php @@ -19,9 +19,9 @@ function base() $tpl->addCss('assets/ui-examples/css/alignment_examples.css'); $edl = $ui_factory->layout()->alignment()->horizontal()->evenlyDistributed( - $ui_factory->legacy()->legacyContent('
Example Block
'), - $ui_factory->legacy()->legacyContent('
Another Example Block
'), - $ui_factory->legacy()->legacyContent('
And a third block is also part of this group
') + $ui_factory->legacy()->content('
Example Block
'), + $ui_factory->legacy()->content('
Another Example Block
'), + $ui_factory->legacy()->content('
And a third block is also part of this group
') ); return $renderer->render($edl); diff --git a/components/ILIAS/UI/src/examples/Layout/Alignment/Horizontal/EvenlyDistributed/nested.php b/components/ILIAS/UI/src/examples/Layout/Alignment/Horizontal/EvenlyDistributed/nested.php index 71146613d0b2..736f064fa020 100755 --- a/components/ILIAS/UI/src/examples/Layout/Alignment/Horizontal/EvenlyDistributed/nested.php +++ b/components/ILIAS/UI/src/examples/Layout/Alignment/Horizontal/EvenlyDistributed/nested.php @@ -19,15 +19,15 @@ function nested() $tpl->addCss('assets/ui-examples/css/alignment_examples.css'); $blocks = [ - $ui_factory->legacy()->legacyContent('
D
'), - $ui_factory->legacy()->legacyContent('
E
'), - $ui_factory->legacy()->legacyContent('
F
') + $ui_factory->legacy()->content('
D
'), + $ui_factory->legacy()->content('
E
'), + $ui_factory->legacy()->content('
F
') ]; $aligned = $ui_factory->layout()->alignment()->horizontal()->evenlyDistributed( - $ui_factory->legacy()->legacyContent('
A
'), - $ui_factory->legacy()->legacyContent('
B
'), - $ui_factory->legacy()->legacyContent('
C
') + $ui_factory->legacy()->content('
A
'), + $ui_factory->legacy()->content('
B
'), + $ui_factory->legacy()->content('
C
') ); return $renderer->render( diff --git a/components/ILIAS/UI/src/examples/Layout/Alignment/Vertical/base.php b/components/ILIAS/UI/src/examples/Layout/Alignment/Vertical/base.php index 6d28e5b0727d..637d8af0bdb2 100755 --- a/components/ILIAS/UI/src/examples/Layout/Alignment/Vertical/base.php +++ b/components/ILIAS/UI/src/examples/Layout/Alignment/Vertical/base.php @@ -19,9 +19,9 @@ function base() $tpl->addCss('assets/ui-examples/css/alignment_examples.css'); $blocks = [ - $ui_factory->legacy()->legacyContent('
Example Block
'), - $ui_factory->legacy()->legacyContent('
Another Example Block
'), - $ui_factory->legacy()->legacyContent('
And a third block is also part of this group
') + $ui_factory->legacy()->content('
Example Block
'), + $ui_factory->legacy()->content('
Another Example Block
'), + $ui_factory->legacy()->content('
And a third block is also part of this group
') ]; $vertical = $ui_factory->layout()->alignment()->vertical(...$blocks); diff --git a/components/ILIAS/UI/src/examples/Layout/Alignment/Vertical/nested.php b/components/ILIAS/UI/src/examples/Layout/Alignment/Vertical/nested.php index c5272f622293..8beb4d4cca90 100755 --- a/components/ILIAS/UI/src/examples/Layout/Alignment/Vertical/nested.php +++ b/components/ILIAS/UI/src/examples/Layout/Alignment/Vertical/nested.php @@ -20,11 +20,11 @@ function nested() $icon = $ui_factory->image()->standard("assets/images/logo/HeaderIconResponsive.svg", "ilias"); $blocks = [ - $ui_factory->legacy()->legacyContent('
Example Block
'), + $ui_factory->legacy()->content('
Example Block
'), $icon, - $ui_factory->legacy()->legacyContent('
Another Example Block
'), + $ui_factory->legacy()->content('
Another Example Block
'), $icon, - $ui_factory->legacy()->legacyContent('
And a third block is also part of this group
') + $ui_factory->legacy()->content('
And a third block is also part of this group
') ]; $dynamic = $ui_factory->layout()->alignment()->horizontal()->dynamicallyDistributed(...$blocks); @@ -36,9 +36,9 @@ function nested() $vertical = $ui_factory->layout()->alignment()->vertical( - $ui_factory->legacy()->legacyContent('
The block above.
'), + $ui_factory->legacy()->content('
The block above.
'), $evenly, - $ui_factory->legacy()->legacyContent('
The block below.
') + $ui_factory->legacy()->content('
The block below.
') ); diff --git a/components/ILIAS/UI/src/examples/Layout/Page/Standard/ui.php b/components/ILIAS/UI/src/examples/Layout/Page/Standard/ui.php index f09d1d5715e9..5aa1687d4cd2 100755 --- a/components/ILIAS/UI/src/examples/Layout/Page/Standard/ui.php +++ b/components/ILIAS/UI/src/examples/Layout/Page/Standard/ui.php @@ -209,7 +209,7 @@ function pagedemoContent(\ILIAS\UI\Factory $f, Renderer $r, MainBar $mainbar): a $f->panel()->standard( 'Demo Content 2', - $f->legacy()->legacyContent("some content
some content
some content
x.") + $f->legacy()->content("some content
some content
some content
x.") ), $f->panel()->standard( 'Demo Content 3', @@ -217,7 +217,7 @@ function pagedemoContent(\ILIAS\UI\Factory $f, Renderer $r, MainBar $mainbar): a ), $f->panel()->standard( 'Demo Content 4', - $f->legacy()->legacyContent("some content
some content
some content
x.") + $f->legacy()->content("some content
some content
some content
x.") ) ]; } @@ -256,7 +256,7 @@ function pagedemoMetabar(\ILIAS\UI\Factory $f): \ILIAS\UI\Component\MainControls $notes = $f->maincontrols()->slate()->legacy( 'Notification', $f->symbol()->glyph()->notification()->withCounter($f->counter()->novelty(3)), - $f->legacy()->legacyContent('

some content

') + $f->legacy()->content('

some content

') ); return $f->mainControls()->metaBar() @@ -399,7 +399,7 @@ function getDemoEntryAchievements(\ILIAS\UI\Factory $f): \ILIAS\UI\Component\Mai return $f->maincontrols()->slate()->legacy( 'Achievements', $symbol, - $f->legacy()->legacyContent('content: Achievements') + $f->legacy()->content('content: Achievements') ); } @@ -411,7 +411,7 @@ function getDemoEntryCommunication(\ILIAS\UI\Factory $f): \ILIAS\UI\Component\Ma return $f->maincontrols()->slate()->legacy( 'Communication', $symbol, - $f->legacy()->legacyContent('content: Communication') + $f->legacy()->content('content: Communication') ); } @@ -448,7 +448,7 @@ function getDemoEntryAdministration(\ILIAS\UI\Factory $f): \ILIAS\UI\Component\M return $f->maincontrols()->slate()->legacy( 'Administration', $symbol, - $f->legacy()->legacyContent('content: Administration') + $f->legacy()->content('content: Administration') ); } @@ -462,7 +462,7 @@ function getDemoEntryTools(\ILIAS\UI\Factory $f): array $slate = $f->maincontrols()->slate()->legacy( 'Help', $symbol, - $f->legacy()->legacyContent(' + $f->legacy()->content('

Help

Some Text for help entry @@ -482,7 +482,7 @@ function getDemoEntryTools(\ILIAS\UI\Factory $f): array $slate = $f->maincontrols()->slate()->legacy( 'Editor', $symbol, - $f->legacy()->legacyContent(' + $f->legacy()->content('

Editor

Some Text for editor entry diff --git a/components/ILIAS/UI/src/examples/Layout/Page/Standard/ui_mainbar.php b/components/ILIAS/UI/src/examples/Layout/Page/Standard/ui_mainbar.php index c3e6166a0958..b5e17d55327b 100755 --- a/components/ILIAS/UI/src/examples/Layout/Page/Standard/ui_mainbar.php +++ b/components/ILIAS/UI/src/examples/Layout/Page/Standard/ui_mainbar.php @@ -136,7 +136,7 @@ function getUIMainbar(\ILIAS\UI\Factory $f, \ILIAS\Data\URI $uri, bool $condense EOT; $symbol = $f->symbol()->icon()->standard('cat', 'Takatuka Land'); - $slate02 = $f->mainControls()->slate()->legacy('Takatuka Land', $symbol, $f->legacy()->legacyContent($contents)); + $slate02 = $f->mainControls()->slate()->legacy('Takatuka Land', $symbol, $f->legacy()->content($contents)); $symbol = $f->symbol()->icon()->standard('cat', 'Schweiz'); $slate03 = $f->mainControls()->slate()->combined('Schweiz', $symbol) @@ -169,7 +169,7 @@ function getUIMainbar(\ILIAS\UI\Factory $f, \ILIAS\Data\URI $uri, bool $condense $mainbar = $mainbar->withToolsButton($tools_btn); $symbol = $f->symbol()->icon()->custom('./components/ILIAS/UI/src/examples/Layout/Page/Standard/question.svg', '')->withSize('small'); - $slate = $f->mainControls()->slate()->legacy('Help', $symbol, $f->legacy()->legacyContent('

tool 1

Some Text for Tool 1 entry

')); + $slate = $f->mainControls()->slate()->legacy('Help', $symbol, $f->legacy()->content('

tool 1

Some Text for Tool 1 entry

')); $tools = ['tool1' => $slate]; foreach ($tools as $id => $entry) { $mainbar = $mainbar->withAdditionalToolEntry($id, $entry); @@ -198,41 +198,41 @@ function getUIContent(\ILIAS\UI\Factory $f, RequestInterface $request): array case 1: $t = 'Tier des Jahres: Fischotter3'; $c = [ - $f->legacy()->legacyContent('

Fischotter

Der Fischotter (Lutra lutra) ist ein an das Wasserleben angepasster Marder, der zu den besten Schwimmern unter den Landraubtieren zählt.

') + $f->legacy()->content('

Fischotter

Der Fischotter (Lutra lutra) ist ein an das Wasserleben angepasster Marder, der zu den besten Schwimmern unter den Landraubtieren zählt.

') ,$f->link()->standard("Quelle: Wikipedia", "https://de.wikipedia.org/wiki/Tier_des_Jahres") ]; break; case 2: $t = 'Tier des Jahres: Maulwurf'; $c = [ - $f->legacy()->legacyContent('

Maulwurf

Der Europäische Maulwurf ist ein mittelgroßer Vertreter der Eurasischen Maulwürfe (Talpa). Er erreicht eine Kopf-Rumpf-Länge von 11,3 bis 15,9 cm, der Schwanz wird 2,5 bis 4,0 cm lang.

') + $f->legacy()->content('

Maulwurf

Der Europäische Maulwurf ist ein mittelgroßer Vertreter der Eurasischen Maulwürfe (Talpa). Er erreicht eine Kopf-Rumpf-Länge von 11,3 bis 15,9 cm, der Schwanz wird 2,5 bis 4,0 cm lang.

') ,$f->link()->standard("Quelle: Wikipedia", "https://de.wikipedia.org/wiki/Tier_des_Jahres") ]; break; case 3: $t = 'Tier des Jahres: Reh'; $c = [ - $f->legacy()->legacyContent('

Reh

Das Reh springt hoch,
das Reh springt weit.
Warum auch nicht?
Es hat ja Zeit.

') + $f->legacy()->content('

Reh

Das Reh springt hoch,
das Reh springt weit.
Warum auch nicht?
Es hat ja Zeit.

') ]; break; case 4: $t = 'Tier des Jahres: Bachflohkrebs'; $c = [ - $f->legacy()->legacyContent('

Bachflohkrebs

Der Bachflohkrebs (Gammarus fossarum) ist ein Flohkrebs aus der Familie der Gammaridae und ein typischer Bachbewohner.
Er reagiert als sogenanntes Zeigertier äußerst empfindlich auf Gewässerverschmutzungen.

') + $f->legacy()->content('

Bachflohkrebs

Der Bachflohkrebs (Gammarus fossarum) ist ein Flohkrebs aus der Familie der Gammaridae und ein typischer Bachbewohner.
Er reagiert als sogenanntes Zeigertier äußerst empfindlich auf Gewässerverschmutzungen.

') ,$f->link()->standard("Quelle: Wikipedia", "https://de.wikipedia.org/wiki/Tier_des_Jahres") ]; break; case 5: $t = 'Tier des Jahres: Wildkatze'; $c = [ - $f->legacy()->legacyContent('

Wildkatze

Die Europäische Wildkatze oder Waldkatze (Felis silvestris) ist eine Kleinkatze, die in Europa von der Iberischen Halbinsel bis Osteuropa (westliche Ukraine), in Italien, auf dem Balkan, in Anatolien, im Kaukasus und in den schottischen Highlands vorkommt.

') + $f->legacy()->content('

Wildkatze

Die Europäische Wildkatze oder Waldkatze (Felis silvestris) ist eine Kleinkatze, die in Europa von der Iberischen Halbinsel bis Osteuropa (westliche Ukraine), in Italien, auf dem Balkan, in Anatolien, im Kaukasus und in den schottischen Highlands vorkommt.

') ,$f->link()->standard("Quelle: Wikipedia", "https://de.wikipedia.org/wiki/Tier_des_Jahres") ]; break; case 6: $t = 'Frühbarock'; $c = [ - $f->legacy()->legacyContent('

Glühwürmchen

Der Große Leuchtkäfer bzw. das Große Glühwürmchen oder Große Johannisglühwürmchen (Lampyris noctiluca) ist ein Käfer aus der Familie Leuchtkäfer (Lampyridae).

') + $f->legacy()->content('

Glühwürmchen

Der Große Leuchtkäfer bzw. das Große Glühwürmchen oder Große Johannisglühwürmchen (Lampyris noctiluca) ist ein Käfer aus der Familie Leuchtkäfer (Lampyridae).

') ,$f->link()->standard("Quelle: Wikipedia", "https://de.wikipedia.org/wiki/Tier_des_Jahres") ]; break; @@ -240,22 +240,22 @@ function getUIContent(\ILIAS\UI\Factory $f, RequestInterface $request): array case 7: $t = 'Frühbarock'; $c = [ - $f->legacy()->legacyContent('

Frühbarock

etwa 1600 bis 1650
unter italienischer Dominanz, mit etwa Monteverdi, Gabrieli.

') + $f->legacy()->content('

Frühbarock

etwa 1600 bis 1650
unter italienischer Dominanz, mit etwa Monteverdi, Gabrieli.

') ,$f->link()->standard("Quelle: Wikipedia", "https://de.wikipedia.org/wiki/Tier_des_Jahres") ]; break; case 8: $t = 'Hochbarock'; - $c = [$f->legacy()->legacyContent('

Hochbarock

etwa 1650 bis 1710
Das französische Musikleben des späten 17. Jahrhunderts wurde maßgeblich von Jean-Baptiste Lully (1632–1687) am Hofe Ludwigs XIV. geprägt.

')]; + $c = [$f->legacy()->content('

Hochbarock

etwa 1650 bis 1710
Das französische Musikleben des späten 17. Jahrhunderts wurde maßgeblich von Jean-Baptiste Lully (1632–1687) am Hofe Ludwigs XIV. geprägt.

')]; break; case 9: $t = 'Spätbarock'; - $c = [$f->legacy()->legacyContent('

Spätbarock

etwa 1710 bis 1750
Entwickelte sich im Hochbarock die Musik noch unabhängig in verschiedenen Regionen Europas, so zeichnete sich der Spätbarock durch eine grenzübergreifende Verbreitung der Stile aus. Im deutschen Raum trieb Georg Philipp Telemann (1681–1767) diese Entwicklung voran und wurde schließlich zur „Ikone“ unter den Tonkünstlern.

')]; + $c = [$f->legacy()->content('

Spätbarock

etwa 1710 bis 1750
Entwickelte sich im Hochbarock die Musik noch unabhängig in verschiedenen Regionen Europas, so zeichnete sich der Spätbarock durch eine grenzübergreifende Verbreitung der Stile aus. Im deutschen Raum trieb Georg Philipp Telemann (1681–1767) diese Entwicklung voran und wurde schließlich zur „Ikone“ unter den Tonkünstlern.

')]; break; default: $t = 'Mainbar-Demo'; - $c = [$f->legacy()->legacyContent('Dies ist ein reduziertes Beispiel für die Mainbar des UI-Frameworks.')]; + $c = [$f->legacy()->content('Dies ist ein reduziertes Beispiel für die Mainbar des UI-Frameworks.')]; } return[$t, $c]; diff --git a/components/ILIAS/UI/src/examples/Legacy/LegacyContent/base.php b/components/ILIAS/UI/src/examples/Legacy/Content/base.php similarity index 82% rename from components/ILIAS/UI/src/examples/Legacy/LegacyContent/base.php rename to components/ILIAS/UI/src/examples/Legacy/Content/base.php index 87c356ad12b9..60ef88d02d5b 100644 --- a/components/ILIAS/UI/src/examples/Legacy/LegacyContent/base.php +++ b/components/ILIAS/UI/src/examples/Legacy/Content/base.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace ILIAS\UI\examples\Legacy\LegacyContent; +namespace ILIAS\UI\examples\Legacy\Content; /** * --- @@ -22,7 +22,7 @@ function base() $renderer = $DIC->ui()->renderer(); //Init Component - $legacy = $f->legacy()->legacyContent("Legacy\Legacy Content"); + $legacy = $f->legacy()->content("Legacy\Content"); //Render return $renderer->render($legacy); diff --git a/components/ILIAS/UI/src/examples/Legacy/LegacyContent/inside_panel.php b/components/ILIAS/UI/src/examples/Legacy/Content/inside_panel.php similarity index 81% rename from components/ILIAS/UI/src/examples/Legacy/LegacyContent/inside_panel.php rename to components/ILIAS/UI/src/examples/Legacy/Content/inside_panel.php index a24d70e8e043..48404571d2ad 100644 --- a/components/ILIAS/UI/src/examples/Legacy/LegacyContent/inside_panel.php +++ b/components/ILIAS/UI/src/examples/Legacy/Content/inside_panel.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace ILIAS\UI\examples\Legacy\LegacyContent; +namespace ILIAS\UI\examples\Legacy\Content; /** * --- @@ -21,7 +21,7 @@ function inside_panel() $renderer = $DIC->ui()->renderer(); //Init Component - $legacy = $f->legacy()->legacyContent("Legacy Content"); + $legacy = $f->legacy()->content("Legacy Content"); $panel = $f->panel()->standard("Panel Title", $legacy); //Render diff --git a/components/ILIAS/UI/src/examples/MainControls/MainBar/mainbar.php b/components/ILIAS/UI/src/examples/MainControls/MainBar/mainbar.php index a6d4afcce9d9..77f964d621af 100755 --- a/components/ILIAS/UI/src/examples/MainControls/MainBar/mainbar.php +++ b/components/ILIAS/UI/src/examples/MainControls/MainBar/mainbar.php @@ -22,7 +22,7 @@ function mainbar(): string $ctrl->setParameterByClass('ilsystemstyledocumentationgui', 'new_ui', '1'); $url = $ctrl->getLinkTargetByClass('ilsystemstyledocumentationgui', 'entries'); $to_page = $f->link()->standard('Full Screen Page Layout', $url); - $txt = $f->legacy()->legacyContent('

Better head over to a preview of page to see a mainbar in its entire beauty...

'); + $txt = $f->legacy()->content('

Better head over to a preview of page to see a mainbar in its entire beauty...

'); return $renderer->render([ $txt, $to_page diff --git a/components/ILIAS/UI/src/examples/MainControls/MetaBar/base_metabar.php b/components/ILIAS/UI/src/examples/MainControls/MetaBar/base_metabar.php index 88ae5aff34c8..9a42da0ddb4c 100755 --- a/components/ILIAS/UI/src/examples/MainControls/MetaBar/base_metabar.php +++ b/components/ILIAS/UI/src/examples/MainControls/MetaBar/base_metabar.php @@ -19,7 +19,7 @@ function base_metabar(): string $renderer = $DIC->ui()->renderer(); $url = $DIC->http()->request()->getUri()->__toString() . '&new_metabar_ui=1'; - $txt = $f->legacy()->legacyContent('

+ $txt = $f->legacy()->content('

The Metabar Example opens in Fullscreen to showcase the behaviour of the metabar best. Note, an comprensive example for developers on how to access the JS API of the Metabar feature bellow in the second example. @@ -42,7 +42,7 @@ function buildMetabar(\ILIAS\UI\Factory $f): \ILIAS\UI\Component\MainControls\Me $notes = $f->mainControls()->slate()->legacy( 'Notification', $f->symbol()->glyph()->notification(), - $f->legacy()->legacyContent('some content') + $f->legacy()->content('some content') ); return $f->mainControls()->metaBar() @@ -101,7 +101,7 @@ function pageMetabarDemoContent(\ILIAS\UI\Factory $f): array return [ $f->panel()->standard( 'All about the Meta Bar', - $f->legacy()->legacyContent( + $f->legacy()->content( "See above" ) ), diff --git a/components/ILIAS/UI/src/examples/MainControls/MetaBar/extended_example_for_developers.php b/components/ILIAS/UI/src/examples/MainControls/MetaBar/extended_example_for_developers.php index d681f27e3650..7714ee8ab447 100755 --- a/components/ILIAS/UI/src/examples/MainControls/MetaBar/extended_example_for_developers.php +++ b/components/ILIAS/UI/src/examples/MainControls/MetaBar/extended_example_for_developers.php @@ -64,7 +64,7 @@ function extended_example_for_developers(): string if ($request_wrapper->has('close_item') && $request_wrapper->retrieve('close_item', $refinery->kindlyTo()->string()) === "true") { //Note that we passe back JS logic here for further processing here - $js = $f->legacy()->legacyContent("")->withOnLoadCode(function ($id) use ($async_replace_content_load_url) { + $js = $f->legacy()->content("")->withOnLoadCode(function ($id) use ($async_replace_content_load_url) { return " il.DemoScopeRemaining--; il.DemoScopeItem.replaceContentByAsyncItemContent('$async_replace_content_load_url',{remaining: il.DemoScopeRemaining,added: il.DemoScopeAdded}); diff --git a/components/ILIAS/UI/src/examples/MainControls/ModeInfo/modeinfo.php b/components/ILIAS/UI/src/examples/MainControls/ModeInfo/modeinfo.php index 1f65ed07e7f9..4aa37bea8378 100755 --- a/components/ILIAS/UI/src/examples/MainControls/ModeInfo/modeinfo.php +++ b/components/ILIAS/UI/src/examples/MainControls/ModeInfo/modeinfo.php @@ -26,7 +26,7 @@ function modeinfo(): string return $renderer->render([ $f->divider()->horizontal(), $f->link()->bulky($icon, 'See UI in fullscreen-mode', $target), - $f->legacy()->legacyContent('

press the link above to init a page with Mode Info


'), + $f->legacy()->content('

press the link above to init a page with Mode Info


'), $f->divider()->horizontal() ]); } @@ -52,11 +52,11 @@ function renderModeInfoFullscreenMode(\ILIAS\DI\Container $dic) $data_factory = new \ILIAS\Data\Factory(); $renderer = $dic->ui()->renderer(); - $panel_content = $f->legacy()->legacyContent("Mode Info is Active"); + $panel_content = $f->legacy()->content("Mode Info is Active"); $slate = $f->mainControls()->slate()->legacy( "Mode Info Active", $f->symbol()->glyph()->notification(), - $f->legacy()->legacyContent("Things todo when special Mode is active") + $f->legacy()->content("Things todo when special Mode is active") ); $page = $f->layout()->page()->standard( diff --git a/components/ILIAS/UI/src/examples/MainControls/Slate/Combined/combined.php b/components/ILIAS/UI/src/examples/MainControls/Slate/Combined/combined.php index b7c2908d18d0..e6add7fc653e 100755 --- a/components/ILIAS/UI/src/examples/MainControls/Slate/Combined/combined.php +++ b/components/ILIAS/UI/src/examples/MainControls/Slate/Combined/combined.php @@ -17,7 +17,7 @@ function combined() $renderer = $DIC->ui()->renderer(); $icon = $f->symbol()->glyph()->comment(); - $contents = $f->legacy()->legacyContent("some contents."); + $contents = $f->legacy()->content("some contents."); $slate1 = $f->maincontrols()->slate()->legacy('legacy1', $icon, $contents); $slate2 = $f->maincontrols()->slate()->legacy('legacy2', $icon, $contents); $divider = $f->divider()->horizontal()->withLabel('Horizontal Divider with Text'); diff --git a/components/ILIAS/UI/src/examples/MainControls/Slate/Legacy/legacy.php b/components/ILIAS/UI/src/examples/MainControls/Slate/Legacy/legacy.php index 8c9403e1cdc4..f6b644c29b6f 100755 --- a/components/ILIAS/UI/src/examples/MainControls/Slate/Legacy/legacy.php +++ b/components/ILIAS/UI/src/examples/MainControls/Slate/Legacy/legacy.php @@ -17,7 +17,7 @@ function legacy() $renderer = $DIC->ui()->renderer(); $icon = $f->symbol()->glyph()->comment(); - $contents = $f->legacy()->legacyContent("some html."); + $contents = $f->legacy()->content("some html."); $slate = $f->maincontrols()->slate()->legacy('legacy_example', $icon, $contents); diff --git a/components/ILIAS/UI/src/examples/MainControls/Slate/Notification/standard.php b/components/ILIAS/UI/src/examples/MainControls/Slate/Notification/standard.php index 80330bbd4fd4..b4a30930457b 100755 --- a/components/ILIAS/UI/src/examples/MainControls/Slate/Notification/standard.php +++ b/components/ILIAS/UI/src/examples/MainControls/Slate/Notification/standard.php @@ -34,7 +34,7 @@ function standard() $mail_notification_item = $f->item()->notification($mail_title, $mail_icon) ->withDescription("You have 23 unread mails in your inbox") ->withProperties(["Time" => "3 days ago"]) - ->withAdditionalContent($f->legacy()->legacyContent("Additional Content")); + ->withAdditionalContent($f->legacy()->content("Additional Content")); //Creating a badge Notification Item with a specific close action here. $close_url = $_SERVER['REQUEST_URI'] . '&badge_closed=true'; diff --git a/components/ILIAS/UI/src/examples/Modal/Interruptive/show_modal_on_button_click_async_rendered.php b/components/ILIAS/UI/src/examples/Modal/Interruptive/show_modal_on_button_click_async_rendered.php index 6a081d24b5c5..9c4617c7f3c6 100755 --- a/components/ILIAS/UI/src/examples/Modal/Interruptive/show_modal_on_button_click_async_rendered.php +++ b/components/ILIAS/UI/src/examples/Modal/Interruptive/show_modal_on_button_click_async_rendered.php @@ -64,7 +64,7 @@ function show_modal_on_button_click_async_rendered() ) { $out[] = $post_wrapper->retrieve('interruptive_items', $refinery->custom()->transformation( function ($v) use ($factory, $post_wrapper, $items) { - return $factory->panel()->standard('Affected Item', $factory->legacy()->legacyContent($items[$v[0]])); + return $factory->panel()->standard('Affected Item', $factory->legacy()->content($items[$v[0]])); } )); } diff --git a/components/ILIAS/UI/src/examples/Modal/RoundTrip/show_multi_step_modal.php b/components/ILIAS/UI/src/examples/Modal/RoundTrip/show_multi_step_modal.php index 5f20a94f354b..1b3af45ab06f 100755 --- a/components/ILIAS/UI/src/examples/Modal/RoundTrip/show_multi_step_modal.php +++ b/components/ILIAS/UI/src/examples/Modal/RoundTrip/show_multi_step_modal.php @@ -32,7 +32,7 @@ function show_multi_step_modal() $page = $request_wrapper->retrieve('page', $refinery->kindlyTo()->string()); } if ($page == "") { - $modal = $f->modal()->roundtrip("Modal Title", $f->legacy()->legacyContent("b")); + $modal = $f->modal()->roundtrip("Modal Title", $f->legacy()->content("b")); $asyncUrl = $url . '&page=login&replaceSignal=' . $modal->getReplaceSignal()->getId(); $modal = $modal->withAsyncRenderUrl($asyncUrl); $button = $f->button()->standard("Sign In", '#') @@ -51,11 +51,11 @@ function show_multi_step_modal() $modal = null; if ($page == "login") { - $legacy = $f->legacy()->legacyContent("

The Login Page

"); + $legacy = $f->legacy()->content("

The Login Page

"); $modal = $f->modal()->roundtrip("Login", [$legacy])->withActionButtons([$button1, $button2]); } if ($page == "register") { - $legacy = $f->legacy()->legacyContent("

The Registration Page

"); + $legacy = $f->legacy()->content("

The Registration Page

"); $modal = $f->modal()->roundtrip("Registration", [$legacy])->withActionButtons([$button1, $button2]); } diff --git a/components/ILIAS/UI/src/examples/Modal/RoundTrip/show_the_same_modal_with_different_buttons.php b/components/ILIAS/UI/src/examples/Modal/RoundTrip/show_the_same_modal_with_different_buttons.php index b0c4eb339f82..d6c95fbf4d8f 100755 --- a/components/ILIAS/UI/src/examples/Modal/RoundTrip/show_the_same_modal_with_different_buttons.php +++ b/components/ILIAS/UI/src/examples/Modal/RoundTrip/show_the_same_modal_with_different_buttons.php @@ -21,7 +21,7 @@ function show_the_same_modal_with_different_buttons() $factory = $DIC->ui()->factory(); $renderer = $DIC->ui()->renderer(); - $modal = $factory->modal()->roundtrip('My Modal 1', $factory->legacy()->legacyContent('My Content')) + $modal = $factory->modal()->roundtrip('My Modal 1', $factory->legacy()->content('My Content')) ->withActionButtons([ $factory->button()->primary('Primary Action', ''), $factory->button()->standard('Secondary Action', ''), diff --git a/components/ILIAS/UI/src/examples/Panel/Report/base.php b/components/ILIAS/UI/src/examples/Panel/Report/base.php index de50d21b9945..9638d71455fc 100755 --- a/components/ILIAS/UI/src/examples/Panel/Report/base.php +++ b/components/ILIAS/UI/src/examples/Panel/Report/base.php @@ -22,9 +22,9 @@ function base() $f = $DIC->ui()->factory(); $renderer = $DIC->ui()->renderer(); - $sub1 = $f->panel()->sub("Sub Panel Title 1", $f->legacy()->legacyContent("Some Content")) - ->withFurtherInformation($f->card()->standard("Card Heading")->withSections(array($f->legacy()->legacyContent("Card Content")))); - $sub2 = $f->panel()->sub("Sub Panel Title 2", $f->legacy()->legacyContent("Some Content")); + $sub1 = $f->panel()->sub("Sub Panel Title 1", $f->legacy()->content("Some Content")) + ->withFurtherInformation($f->card()->standard("Card Heading")->withSections(array($f->legacy()->content("Card Content")))); + $sub2 = $f->panel()->sub("Sub Panel Title 2", $f->legacy()->content("Some Content")); $block = $f->panel()->report("Report Title", array($sub1,$sub2)); diff --git a/components/ILIAS/UI/src/examples/Panel/Report/with_view_controls.php b/components/ILIAS/UI/src/examples/Panel/Report/with_view_controls.php index a50bde06fd0e..c5d310bc0120 100755 --- a/components/ILIAS/UI/src/examples/Panel/Report/with_view_controls.php +++ b/components/ILIAS/UI/src/examples/Panel/Report/with_view_controls.php @@ -56,9 +56,9 @@ static function ($carry, $item) use ($presentation_options, $url) { $content = "This is clearly a lot more information!"; } - $sub1 = $f->panel()->sub("Sub Panel Title 1", $f->legacy()->legacyContent($content)) - ->withFurtherInformation($f->card()->standard("Card Heading")->withSections(array($f->legacy()->legacyContent("Card Content")))); - $sub2 = $f->panel()->sub("Sub Panel Title 2", $f->legacy()->legacyContent($content)); + $sub1 = $f->panel()->sub("Sub Panel Title 1", $f->legacy()->content($content)) + ->withFurtherInformation($f->card()->standard("Card Heading")->withSections(array($f->legacy()->content("Card Content")))); + $sub2 = $f->panel()->sub("Sub Panel Title 2", $f->legacy()->content($content)); $block = $f->panel()->report("Report Title", [$sub1, $sub2]) ->withActions($actions) diff --git a/components/ILIAS/UI/src/examples/Panel/Secondary/Legacy/base.php b/components/ILIAS/UI/src/examples/Panel/Secondary/Legacy/base.php index b4d1b0fcb3b2..50e6590e2815 100755 --- a/components/ILIAS/UI/src/examples/Panel/Secondary/Legacy/base.php +++ b/components/ILIAS/UI/src/examples/Panel/Secondary/Legacy/base.php @@ -24,7 +24,7 @@ function base() $factory->button()->shy("GitHub", "https://www.github.com") )); - $legacy = $factory->legacy()->legacyContent("Legacy content"); + $legacy = $factory->legacy()->content("Legacy content"); $panel = $factory->panel()->secondary()->legacy( "Legacy panel title", diff --git a/components/ILIAS/UI/src/examples/Panel/Secondary/Legacy/with_all_view_controls.php b/components/ILIAS/UI/src/examples/Panel/Secondary/Legacy/with_all_view_controls.php index 8b6b8618ac97..1f643f638900 100755 --- a/components/ILIAS/UI/src/examples/Panel/Secondary/Legacy/with_all_view_controls.php +++ b/components/ILIAS/UI/src/examples/Panel/Secondary/Legacy/with_all_view_controls.php @@ -124,7 +124,7 @@ static function ($carry, $item) use ($presentation_options, $url) { $std_list = $f->panel()->secondary()->legacy( "List Title", - $f->legacy()->legacyContent( + $f->legacy()->content( $renderer->render([ $f->item()->group("Subtitle 1", [ $item1, diff --git a/components/ILIAS/UI/src/examples/Panel/Secondary/Legacy/with_footer.php b/components/ILIAS/UI/src/examples/Panel/Secondary/Legacy/with_footer.php index 5194dd066a05..dc339c7888a7 100755 --- a/components/ILIAS/UI/src/examples/Panel/Secondary/Legacy/with_footer.php +++ b/components/ILIAS/UI/src/examples/Panel/Secondary/Legacy/with_footer.php @@ -28,7 +28,7 @@ function with_footer() $html .= $renderer->render($factory->button()->tag($tag, "")); } - $legacy = $factory->legacy()->legacyContent($html); + $legacy = $factory->legacy()->content($html); $link = $factory->button()->Shy("Edit Keywords", ""); $panel = $factory->panel()->secondary()->legacy("panel title", $legacy)->withFooter($link); diff --git a/components/ILIAS/UI/src/examples/Panel/Standard/base_text_block.php b/components/ILIAS/UI/src/examples/Panel/Standard/base_text_block.php index 7f44a1b9b633..372a267fc75d 100755 --- a/components/ILIAS/UI/src/examples/Panel/Standard/base_text_block.php +++ b/components/ILIAS/UI/src/examples/Panel/Standard/base_text_block.php @@ -21,7 +21,7 @@ function base_text_block() $panel = $f->panel()->standard( "Panel Title", - $f->legacy()->legacyContent("Some Content") + $f->legacy()->content("Some Content") ); return $renderer->render($panel); diff --git a/components/ILIAS/UI/src/examples/Panel/Standard/with_actions.php b/components/ILIAS/UI/src/examples/Panel/Standard/with_actions.php index 3f0279155990..4cf00f8cf34a 100755 --- a/components/ILIAS/UI/src/examples/Panel/Standard/with_actions.php +++ b/components/ILIAS/UI/src/examples/Panel/Standard/with_actions.php @@ -27,7 +27,7 @@ function with_actions() $panel = $f->panel()->standard( "Panel Title", - $f->legacy()->legacyContent("Some Content") + $f->legacy()->content("Some Content") )->withActions($actions); return $renderer->render($panel); diff --git a/components/ILIAS/UI/src/examples/Panel/Sub/base.php b/components/ILIAS/UI/src/examples/Panel/Sub/base.php index 82b6966c240f..15701a1c34df 100755 --- a/components/ILIAS/UI/src/examples/Panel/Sub/base.php +++ b/components/ILIAS/UI/src/examples/Panel/Sub/base.php @@ -22,7 +22,7 @@ function base() $block = $f->panel()->standard( "Panel Title", - $f->panel()->sub("Sub Panel Title", $f->legacy()->legacyContent("Some Content")) + $f->panel()->sub("Sub Panel Title", $f->legacy()->content("Some Content")) ); return $renderer->render($block); diff --git a/components/ILIAS/UI/src/examples/Panel/Sub/with_actions.php b/components/ILIAS/UI/src/examples/Panel/Sub/with_actions.php index 51183350949b..5f9b48c5438d 100755 --- a/components/ILIAS/UI/src/examples/Panel/Sub/with_actions.php +++ b/components/ILIAS/UI/src/examples/Panel/Sub/with_actions.php @@ -28,7 +28,7 @@ function with_actions() $block = $f->panel()->standard( "Panel Title", - $f->panel()->sub("Sub Panel Title", $f->legacy()->legacyContent("Some Content"))->withActions($actions) + $f->panel()->sub("Sub Panel Title", $f->legacy()->content("Some Content"))->withActions($actions) ); return $renderer->render($block); diff --git a/components/ILIAS/UI/src/examples/Panel/Sub/with_card.php b/components/ILIAS/UI/src/examples/Panel/Sub/with_card.php index 4e1edd33814d..37a6929e665c 100755 --- a/components/ILIAS/UI/src/examples/Panel/Sub/with_card.php +++ b/components/ILIAS/UI/src/examples/Panel/Sub/with_card.php @@ -24,8 +24,8 @@ function with_card() $block = $f->panel()->standard( "Panel Title", - $f->panel()->sub("Sub Panel Title", $f->legacy()->legacyContent("Some Content")) - ->withFurtherInformation($f->card()->standard("Card Heading")->withSections(array($f->legacy()->legacyContent("Card Content")))) + $f->panel()->sub("Sub Panel Title", $f->legacy()->content("Some Content")) + ->withFurtherInformation($f->card()->standard("Card Heading")->withSections(array($f->legacy()->content("Card Content")))) ); return $renderer->render($block); diff --git a/components/ILIAS/UI/src/examples/Panel/Sub/with_secondary_panel.php b/components/ILIAS/UI/src/examples/Panel/Sub/with_secondary_panel.php index be9826f93314..0b71adba4348 100755 --- a/components/ILIAS/UI/src/examples/Panel/Sub/with_secondary_panel.php +++ b/components/ILIAS/UI/src/examples/Panel/Sub/with_secondary_panel.php @@ -50,7 +50,7 @@ function with_secondary_panel() $block = $f->panel()->standard( "Panel Title", - $f->panel()->sub("Sub Panel Title", $f->legacy()->legacyContent("Some Content")) + $f->panel()->sub("Sub Panel Title", $f->legacy()->content("Some Content")) ->withFurtherInformation($panel) ); diff --git a/components/ILIAS/UI/src/examples/Popover/Standard/show_card_in_popover.php b/components/ILIAS/UI/src/examples/Popover/Standard/show_card_in_popover.php index de25945c307f..92f494d29317 100755 --- a/components/ILIAS/UI/src/examples/Popover/Standard/show_card_in_popover.php +++ b/components/ILIAS/UI/src/examples/Popover/Standard/show_card_in_popover.php @@ -28,7 +28,7 @@ function show_card_in_popover() $renderer = $DIC->ui()->renderer(); $image = $factory->image()->responsive("./assets/images/logo/HeaderIcon.svg", "Thumbnail Example"); - $card = $factory->card()->standard("Title", $image)->withSections(array($factory->legacy()->legacyContent("Hello World, I'm a card"))); + $card = $factory->card()->standard("Title", $image)->withSections(array($factory->legacy()->content("Hello World, I'm a card"))); $popover = $factory->popover()->standard($card)->withTitle('Card'); $button = $factory->button()->standard('Show Card', '#') ->withOnClick($popover->getShowSignal()); diff --git a/components/ILIAS/UI/src/examples/Popover/Standard/show_popover_with_async_loaded_content.php b/components/ILIAS/UI/src/examples/Popover/Standard/show_popover_with_async_loaded_content.php index be350e0a543e..9800b51fa8d2 100755 --- a/components/ILIAS/UI/src/examples/Popover/Standard/show_popover_with_async_loaded_content.php +++ b/components/ILIAS/UI/src/examples/Popover/Standard/show_popover_with_async_loaded_content.php @@ -33,13 +33,13 @@ function show_popover_with_async_loaded_content() // This is the ajax request to load the content of the popover. During the ajax request, // a loading spinner is presented to the user. Check the code below on how to construct the popover, // e.g. using Popover::withAsyncContentUrl(). - $content = $factory->legacy()->legacyContent('This text is rendered async'); + $content = $factory->legacy()->content('This text is rendered async'); echo $renderer->render($content); exit(); } $async_url = $_SERVER['REQUEST_URI'] . '&renderPopoverAsync=1'; - $popover = $factory->popover()->standard($factory->legacy()->legacyContent('')) + $popover = $factory->popover()->standard($factory->legacy()->content('')) ->withTitle('Popover') ->withAsyncContentUrl($async_url); $button = $factory->button()->standard('Show Popover', '#') diff --git a/components/ILIAS/UI/src/examples/Popover/Standard/show_popover_with_different_positions.php b/components/ILIAS/UI/src/examples/Popover/Standard/show_popover_with_different_positions.php index f155f7c573eb..362000ecf24c 100755 --- a/components/ILIAS/UI/src/examples/Popover/Standard/show_popover_with_different_positions.php +++ b/components/ILIAS/UI/src/examples/Popover/Standard/show_popover_with_different_positions.php @@ -26,18 +26,18 @@ function show_popover_with_different_positions() $factory = $DIC->ui()->factory(); $renderer = $DIC->ui()->renderer(); - $content = $factory->legacy()->legacyContent('The position of this popover is calculated automatically based on the available space. Note that the max width CSS setting is used here, as this text is quite long.'); + $content = $factory->legacy()->content('The position of this popover is calculated automatically based on the available space. Note that the max width CSS setting is used here, as this text is quite long.'); $popover = $factory->popover()->standard($content); $button = $factory->button()->standard('Auto Popover', '#') ->withOnClick($popover->getShowSignal()); - $content = $factory->legacy()->legacyContent('The position of this popover is either on top or bottom of the triggerer, based on the available space'); + $content = $factory->legacy()->content('The position of this popover is either on top or bottom of the triggerer, based on the available space'); $popover2 = $factory->popover()->standard($content) ->withVerticalPosition(); $button2 = $factory->button()->standard('Vertical Popover', '#') ->withOnClick($popover2->getShowSignal()); - $content = $factory->legacy()->legacyContent('The position of this popover is either on the left or right of the triggerer, based on the available space'); + $content = $factory->legacy()->content('The position of this popover is either on the left or right of the triggerer, based on the available space'); $popover3 = $factory->popover()->standard($content) ->withHorizontalPosition(); $button3 = $factory->button()->standard('Horizontal Popover', '#') diff --git a/components/ILIAS/UI/src/examples/Popover/Standard/show_popover_with_dynamic_changing_content.php b/components/ILIAS/UI/src/examples/Popover/Standard/show_popover_with_dynamic_changing_content.php index 67450da85ce0..3b1d5915e62c 100755 --- a/components/ILIAS/UI/src/examples/Popover/Standard/show_popover_with_dynamic_changing_content.php +++ b/components/ILIAS/UI/src/examples/Popover/Standard/show_popover_with_dynamic_changing_content.php @@ -62,13 +62,13 @@ function show_popover_with_dynamic_changing_content() $replaceSignal = new ReplaceContentSignal($signalId); $button = $factory->button()->standard('Back to Overview', '#') ->withOnClick($replaceSignal->withAsyncRenderUrl($url . '&page=overview&replaceSignal=' . $signalId)); - $intro = $factory->legacy()->legacyContent("

You are viewing page $page

"); + $intro = $factory->legacy()->content("

You are viewing page $page

"); echo $renderer->renderAsync([$intro, $button]); exit(); } // This is the "normal" request to render the popover. Any content of the popover is rendered async. - $popover = $factory->popover()->standard($factory->legacy()->legacyContent(''))->withTitle('Pages'); + $popover = $factory->popover()->standard($factory->legacy()->content(''))->withTitle('Pages'); $asyncUrl = $url . '&page=overview&replaceSignal=' . $popover->getReplaceContentSignal()->getId(); $popover = $popover->withAsyncContentUrl($asyncUrl); $button = $factory->button()->standard('Show Popover', '#') diff --git a/components/ILIAS/UI/src/examples/Popover/Standard/show_popover_with_vertical_scrollbars.php b/components/ILIAS/UI/src/examples/Popover/Standard/show_popover_with_vertical_scrollbars.php index d0740ce3798f..aa3a0d514d8f 100755 --- a/components/ILIAS/UI/src/examples/Popover/Standard/show_popover_with_vertical_scrollbars.php +++ b/components/ILIAS/UI/src/examples/Popover/Standard/show_popover_with_vertical_scrollbars.php @@ -50,7 +50,7 @@ function show_popover_with_vertical_scrollbars() // height of the list to 200px and display vertical scrollbars, if needed. $content = "
{$list}
"; - $popover = $factory->popover()->standard($factory->legacy()->legacyContent($content))->withTitle('Series'); + $popover = $factory->popover()->standard($factory->legacy()->content($content))->withTitle('Series'); $button = $factory->button()->standard('Show me some Series', '#') ->withOnClick($popover->getShowSignal()); diff --git a/components/ILIAS/UI/src/examples/Prompt/State/Show/base.php b/components/ILIAS/UI/src/examples/Prompt/State/Show/base.php index 7bacbebc459c..f5585299f709 100644 --- a/components/ILIAS/UI/src/examples/Prompt/State/Show/base.php +++ b/components/ILIAS/UI/src/examples/Prompt/State/Show/base.php @@ -51,7 +51,7 @@ function base() //show the response contents: - $txt_response = $factory->legacy()->legacyContent( + $txt_response = $factory->legacy()->content( '
'
         . htmlentities($renderer->render($response))
         . '
' diff --git a/components/ILIAS/UI/src/examples/Table/Ordering/base.php b/components/ILIAS/UI/src/examples/Table/Ordering/base.php index f60b215aab6a..2843cc781d9c 100644 --- a/components/ILIAS/UI/src/examples/Table/Ordering/base.php +++ b/components/ILIAS/UI/src/examples/Table/Ordering/base.php @@ -152,7 +152,7 @@ public function setOrder(array $ordered): void && $request_wrapper->retrieve('ordering_example', $refinery->kindlyTo()->int()) === 1 ) { if ($data = $table->getData()) { - $out[] = $f->legacy()->legacyContent('
' . print_r($data, true) . '
'); + $out[] = $f->legacy()->content('
' . print_r($data, true) . '
'); } $data_retrieval->setOrder($data); } diff --git a/components/ILIAS/UI/tests/Component/Card/CardTest.php b/components/ILIAS/UI/tests/Component/Card/CardTest.php index ca30cb850086..a833c918e41a 100755 --- a/components/ILIAS/UI/tests/Component/Card/CardTest.php +++ b/components/ILIAS/UI/tests/Component/Card/CardTest.php @@ -137,7 +137,7 @@ public function testWithSection(): void { $f = $this->getFactory(); $c = $this->getBaseCard(); - $content = $f->legacy()->legacyContent("Random Content"); + $content = $f->legacy()->content("Random Content"); $c = $c->withSections(array($content)); $this->assertEquals($c->getSections(), array($content)); @@ -147,7 +147,7 @@ public function testRenderContentFull(): void { $r = $this->getDefaultRenderer(); $c = $this->getBaseCard(); - $content = $this->getfactory()->legacy()->legacyContent("Random Content"); + $content = $this->getfactory()->legacy()->content("Random Content"); $c = $c->withSections(array($content)); diff --git a/components/ILIAS/UI/tests/Component/Dropzone/File/WrapperTest.php b/components/ILIAS/UI/tests/Component/Dropzone/File/WrapperTest.php index c866f432c9db..0505f52ba85e 100755 --- a/components/ILIAS/UI/tests/Component/Dropzone/File/WrapperTest.php +++ b/components/ILIAS/UI/tests/Component/Dropzone/File/WrapperTest.php @@ -20,7 +20,7 @@ namespace ILIAS\Tests\UI\Component\Dropzone\File; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; use ILIAS\UI\Implementation\Component\Input\Field\Text; require_once("./components/ILIAS/UI/tests/Component/Dropzone/File/FileTestBase.php"); @@ -54,7 +54,7 @@ public function testRenderWrapper(): void ' ); - $legacy_mock = $this->createMock(LegacyContent::class); + $legacy_mock = $this->createMock(Content::class); $legacy_mock->method('getCanonicalName')->willReturn($expected_legacy_html); $dropzone = $this->factory->wrapper($expected_title, $expected_url, $legacy_mock, $this->input); diff --git a/components/ILIAS/UI/tests/Component/Entity/EntityTest.php b/components/ILIAS/UI/tests/Component/Entity/EntityTest.php index 829f0f09160a..caa040626299 100755 --- a/components/ILIAS/UI/tests/Component/Entity/EntityTest.php +++ b/components/ILIAS/UI/tests/Component/Entity/EntityTest.php @@ -24,7 +24,7 @@ use ILIAS\UI\Implementation\Component\Link; use ILIAS\UI\Implementation\Component\Image; use ILIAS\UI\Implementation\Component\Dropdown; -use ILIAS\UI\Implementation\Component\Legacy\LegacyContent; +use ILIAS\UI\Implementation\Component\Legacy\Content; use ILIAS\UI\Implementation\Component\SignalGenerator; use ILIAS\UI\Component as I; use ILIAS\UI\Factory as UIFactory; @@ -36,9 +36,9 @@ protected function getEntityFactory(): Entity\Factory return new Entity\Factory(); } - protected function legacy(string $string): LegacyContent + protected function legacy(string $string): Content { - return new LegacyContent($string, (new SignalGenerator())); + return new Content($string, (new SignalGenerator())); } public function testEntityFactory(): void diff --git a/components/ILIAS/UI/tests/Component/Input/Container/Filter/FilterInputTest.php b/components/ILIAS/UI/tests/Component/Input/Container/Filter/FilterInputTest.php index b308850e8bfb..ac26920039d8 100644 --- a/components/ILIAS/UI/tests/Component/Input/Container/Filter/FilterInputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Container/Filter/FilterInputTest.php @@ -101,8 +101,8 @@ protected function buildPopoverFactory(): I\Popover\Factory protected function buildLegacyFactory(): I\Legacy\Factory { $mock = $this->createMock(I\Legacy\Factory::class); - $mock->method('legacyContent')->willReturn( - new I\Legacy\LegacyContent('', new I\SignalGenerator()) + $mock->method('content')->willReturn( + new I\Legacy\Content('', new I\SignalGenerator()) ); return $mock; } diff --git a/components/ILIAS/UI/tests/Component/Input/Container/Filter/StandardFilterTest.php b/components/ILIAS/UI/tests/Component/Input/Container/Filter/StandardFilterTest.php index 57421f29f610..914b185fdfa1 100755 --- a/components/ILIAS/UI/tests/Component/Input/Container/Filter/StandardFilterTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Container/Filter/StandardFilterTest.php @@ -122,8 +122,8 @@ protected function buildPopoverFactory(): I\Popover\Factory protected function buildLegacyFactory(): I\Legacy\Factory { $mock = $this->createMock(I\Legacy\Factory::class); - $mock->method('legacyContent')->willReturn( - new I\Legacy\LegacyContent('', new I\SignalGenerator()) + $mock->method('content')->willReturn( + new I\Legacy\Content('', new I\SignalGenerator()) ); return $mock; } diff --git a/components/ILIAS/UI/tests/Component/Item/ItemNotificationTest.php b/components/ILIAS/UI/tests/Component/Item/ItemNotificationTest.php index 2937a14efaa7..0197a61652ff 100755 --- a/components/ILIAS/UI/tests/Component/Item/ItemNotificationTest.php +++ b/components/ILIAS/UI/tests/Component/Item/ItemNotificationTest.php @@ -167,7 +167,7 @@ public function testWithAdditionalContent(): void { $f = $this->getUIFactory()->item(); - $content = new I\Component\Legacy\LegacyContent("someContent", $this->sig_gen); + $content = new I\Component\Legacy\Content("someContent", $this->sig_gen); $c = $f->notification("title", $this->getIcon())->withAdditionalContent($content); $this->assertEquals($c->getAdditionalContent(), $content); @@ -207,7 +207,7 @@ public function getOnLoadCodeAsync(): string }); $props = array("prop1" => "val1", "prop2" => "val2"); - $content = new I\Component\Legacy\LegacyContent("someContent", $this->sig_gen); + $content = new I\Component\Legacy\Content("someContent", $this->sig_gen); $actions = new I\Component\Dropdown\Standard(array( new I\Component\Button\Shy("ILIAS", "https://www.ilias.de"), new I\Component\Button\Shy("GitHub", "https://www.github.com") diff --git a/components/ILIAS/UI/tests/Component/Layout/Alignment/AlignmentTest.php b/components/ILIAS/UI/tests/Component/Layout/Alignment/AlignmentTest.php index 6acb8d1fac05..b84d485c827f 100755 --- a/components/ILIAS/UI/tests/Component/Layout/Alignment/AlignmentTest.php +++ b/components/ILIAS/UI/tests/Component/Layout/Alignment/AlignmentTest.php @@ -33,8 +33,8 @@ public function testAlignmentBasicConstruction(): void { $f = new C\Layout\Alignment\Factory(); $blocks = [ - new C\Legacy\LegacyContent('block', new C\SignalGenerator()), - new C\Legacy\LegacyContent('block', new C\SignalGenerator()) + new C\Legacy\Content('block', new C\SignalGenerator()), + new C\Legacy\Content('block', new C\SignalGenerator()) ]; $vert = $f->vertical(...$blocks); $this->assertInstanceOf(I\Layout\Alignment\Alignment::class, $vert); @@ -51,8 +51,8 @@ public function testAlignmentEvenlyRendering(): void { $f = new C\Layout\Alignment\Factory(); $blocks = [ - new C\Legacy\LegacyContent('block', new C\SignalGenerator()), - new C\Legacy\LegacyContent('block', new C\SignalGenerator()) + new C\Legacy\Content('block', new C\SignalGenerator()), + new C\Legacy\Content('block', new C\SignalGenerator()) ]; $renderer = $this->getDefaultRenderer(); @@ -72,8 +72,8 @@ public function testAlignmentDynamicalRendering(): void { $f = new C\Layout\Alignment\Factory(); $blocks = [ - new C\Legacy\LegacyContent('block', new C\SignalGenerator()), - new C\Legacy\LegacyContent('block', new C\SignalGenerator()) + new C\Legacy\Content('block', new C\SignalGenerator()), + new C\Legacy\Content('block', new C\SignalGenerator()) ]; $renderer = $this->getDefaultRenderer(); @@ -92,8 +92,8 @@ public function testAlignmentVerticalRendering(): void { $f = new C\Layout\Alignment\Factory(); $blocks = [ - new C\Legacy\LegacyContent('block', new C\SignalGenerator()), - new C\Legacy\LegacyContent('block', new C\SignalGenerator()) + new C\Legacy\Content('block', new C\SignalGenerator()), + new C\Legacy\Content('block', new C\SignalGenerator()) ]; $renderer = $this->getDefaultRenderer(); diff --git a/components/ILIAS/UI/tests/Component/Layout/Page/StandardPageTest.php b/components/ILIAS/UI/tests/Component/Layout/Page/StandardPageTest.php index 1c0a7f2835fa..abd855bb447b 100755 --- a/components/ILIAS/UI/tests/Component/Layout/Page/StandardPageTest.php +++ b/components/ILIAS/UI/tests/Component/Layout/Page/StandardPageTest.php @@ -28,7 +28,7 @@ use ILIAS\UI\Component\Image\Image; use ILIAS\UI\Component\Toast\Container; use ILIAS\UI\Implementation\Component\Layout\Page; -use ILIAS\UI\Implementation\Component\Legacy\LegacyContent; +use ILIAS\UI\Implementation\Component\Legacy\Content; use ILIAS\UI\Implementation\Component\SignalGenerator; use ILIAS\UI\Implementation\Component\Breadcrumbs\Breadcrumbs as Crumbs; use ILIAS\UI\Implementation\Component\Link\Standard as CrumbEntry; @@ -72,7 +72,7 @@ public function setUp(): void $this->responsive_logo->method("getCanonicalName")->willReturn("Responsive Logo Stub"); $this->overlay = $this->createMock(Container::class); $this->overlay->method("getCanonicalName")->willReturn("Overlay Stub"); - $this->contents = array(new LegacyContent('some content', $sig_gen)); + $this->contents = array(new Content('some content', $sig_gen)); $this->title = 'pagetitle'; $this->factory = new Page\Factory(); diff --git a/components/ILIAS/UI/tests/Component/Legacy/LegacyTest.php b/components/ILIAS/UI/tests/Component/Legacy/LegacyTest.php index 5d3be2d04a27..3b04b421b504 100755 --- a/components/ILIAS/UI/tests/Component/Legacy/LegacyTest.php +++ b/components/ILIAS/UI/tests/Component/Legacy/LegacyTest.php @@ -45,15 +45,15 @@ public function testImplementsFactoryInterface(): void $this->assertInstanceOf("ILIAS\\UI\\Factory", $f); $this->assertInstanceOf( - "ILIAS\\UI\\Component\\Legacy\\LegacyContent", - $f->legacy()->legacyContent("Legacy Content") + "ILIAS\\UI\\Component\\Legacy\\Content", + $f->legacy()->content("Legacy Content") ); } public function testGetContent(): void { $f = $this->getUIFactory(); - $g = $f->legacy()->legacyContent("Legacy Content"); + $g = $f->legacy()->content("Legacy Content"); $this->assertEquals("Legacy Content", $g->getContent()); } @@ -64,7 +64,7 @@ public function testRenderContent(): void $f = $this->getUIFactory(); $r = $this->getDefaultRenderer(); - $g = $f->legacy()->legacyContent("Legacy Content"); + $g = $f->legacy()->content("Legacy Content"); $this->assertEquals("Legacy Content", $r->render($g)); } @@ -77,14 +77,14 @@ public function testCreateWithCustomSignal(): void $f = $this->getUIFactory(); $signal_name = 'Custom Signal'; - $f->legacy()->legacyContent('')->withCustomSignal($signal_name, ''); + $f->legacy()->content('')->withCustomSignal($signal_name, ''); } public function testGetExistingCustomSignal(): void { $f = $this->getUIFactory(); $signal_name = 'Custom Signal'; - $g = $f->legacy()->legacyContent('')->withCustomSignal($signal_name, ''); + $g = $f->legacy()->content('')->withCustomSignal($signal_name, ''); $this->assertNotNull($g->getCustomSignal($signal_name)); } @@ -93,7 +93,7 @@ public function testGetNonExistingCustomSignal(): void { $f = $this->getUIFactory(); $signal_name = 'Custom Signal'; - $g = $f->legacy()->legacyContent(''); + $g = $f->legacy()->content(''); $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage("Signal with name $signal_name is not registered"); @@ -106,7 +106,7 @@ public function testGetListOfSignals(): void $signal_name_1 = 'Custom Signal 1'; $signal_name_2 = 'Custom Signal 2'; - $g = $f->legacy()->legacyContent('')->withCustomSignal($signal_name_1, '')->withCustomSignal($signal_name_2, ''); + $g = $f->legacy()->content('')->withCustomSignal($signal_name_1, '')->withCustomSignal($signal_name_2, ''); $l = $g->getAllCustomSignals(); $this->assertIsArray($l); @@ -120,7 +120,7 @@ public function testGetListWithCustomSignalsAndCode(): void $signal_name_2 = 'Custom Signal 2'; $custom_code_2 = 'custom_js2();'; - $g = $f->legacy()->legacyContent('') + $g = $f->legacy()->content('') ->withCustomSignal($signal_name_1, $custom_code_1) ->withCustomSignal($signal_name_2, $custom_code_2); $signal_list = $g->getAllCustomSignals(); diff --git a/components/ILIAS/UI/tests/Component/MainControls/MainBarTest.php b/components/ILIAS/UI/tests/Component/MainControls/MainBarTest.php index 3a8082014c0b..49d0cf14d1c1 100755 --- a/components/ILIAS/UI/tests/Component/MainControls/MainBarTest.php +++ b/components/ILIAS/UI/tests/Component/MainControls/MainBarTest.php @@ -233,7 +233,7 @@ public function testRendering(): void ) ); - $toolslate = $sf->legacy('Help', $icon, new I\Legacy\LegacyContent('Help', new I\SignalGenerator())); + $toolslate = $sf->legacy('Help', $icon, new I\Legacy\Content('Help', new I\SignalGenerator())); $mb = $this->factory->mainBar() ->withAdditionalEntry('test1', $this->getButton()) diff --git a/components/ILIAS/UI/tests/Component/Menu/Drilldown/DrilldownTest.php b/components/ILIAS/UI/tests/Component/Menu/Drilldown/DrilldownTest.php index 927e352172d7..92a85d1894cc 100755 --- a/components/ILIAS/UI/tests/Component/Menu/Drilldown/DrilldownTest.php +++ b/components/ILIAS/UI/tests/Component/Menu/Drilldown/DrilldownTest.php @@ -34,7 +34,7 @@ class DrilldownTest extends ILIAS_UI_TestBase protected C\Symbol\Glyph\Glyph $glyph; protected C\Button\Standard $button; protected C\Divider\Horizontal $divider; - protected C\Legacy\LegacyContent $legacy; + protected C\Legacy\Content $legacy; public function getUIFactory(): NoUIFactory { @@ -74,7 +74,7 @@ public function setUp(): void $this->glyph = $glyph_factory->user(''); $this->button = $button_factory->standard('', ''); $this->divider = $divider_factory->horizontal(); - $this->legacy = $this->getUIFactory()->legacy()->legacyContent(''); + $this->legacy = $this->getUIFactory()->legacy()->content(''); } public function testConstruction(): C\Menu\Drilldown diff --git a/components/ILIAS/UI/tests/Component/Modal/RoundTripTest.php b/components/ILIAS/UI/tests/Component/Modal/RoundTripTest.php index e54a84a0c636..60edb041074a 100755 --- a/components/ILIAS/UI/tests/Component/Modal/RoundTripTest.php +++ b/components/ILIAS/UI/tests/Component/Modal/RoundTripTest.php @@ -69,7 +69,7 @@ public function testWithActionButtons(): void public function testSimpleRendering(): void { - $roundtrip = $this->getModalFactory()->roundtrip('Title', $this->getUIFactory()->legacy()->legacyContent('Content')) + $roundtrip = $this->getModalFactory()->roundtrip('Title', $this->getUIFactory()->legacy()->content('Content')) ->withActionButtons([ $this->getButtonFactory()->primary('Action 1', ''), $this->getButtonFactory()->standard('Action 2', ''), diff --git a/components/ILIAS/UI/tests/Component/Panel/PanelSecondaryLegacyTest.php b/components/ILIAS/UI/tests/Component/Panel/PanelSecondaryLegacyTest.php index 01def921433a..9e1be8b0e46e 100755 --- a/components/ILIAS/UI/tests/Component/Panel/PanelSecondaryLegacyTest.php +++ b/components/ILIAS/UI/tests/Component/Panel/PanelSecondaryLegacyTest.php @@ -33,7 +33,7 @@ class PanelSecondaryLegacyTest extends ILIAS_UI_TestBase public function getUIFactory(): NoUIFactory { return new class () extends NoUIFactory { - public function legacyPanel(string $title, C\Legacy\LegacyContent $content): I\Component\Panel\Secondary\Legacy + public function legacyPanel(string $title, C\Legacy\Content $content): I\Component\Panel\Secondary\Legacy { return new I\Component\Panel\Secondary\Legacy($title, $content); } @@ -78,7 +78,7 @@ protected function cleanHTML(string $html): string public function testImplementsFactoryInterface(): void { - $legacy = $this->getUIfactory()->legacy()->legacyContent("Legacy content"); + $legacy = $this->getUIfactory()->legacy()->content("Legacy content"); $secondary_panel = $this->getUIFactory()->legacyPanel("List Title", $legacy); $this->assertInstanceOf("ILIAS\\UI\\Component\\Panel\\Secondary\\Legacy", $secondary_panel); @@ -86,7 +86,7 @@ public function testImplementsFactoryInterface(): void public function testGetTitle(): void { - $legacy = $this->getUIfactory()->legacy()->legacyContent("Legacy content"); + $legacy = $this->getUIfactory()->legacy()->content("Legacy content"); $secondary_panel = $this->getUIFactory()->legacyPanel("Title", $legacy); $this->assertEquals("Title", $secondary_panel->getTitle()); @@ -94,7 +94,7 @@ public function testGetTitle(): void public function testGetLegacyComponent(): void { - $legacy = $this->getUIfactory()->legacy()->legacyContent("Legacy content"); + $legacy = $this->getUIfactory()->legacy()->content("Legacy content"); $secondary_panel = $this->getUIFactory()->legacyPanel("title", $legacy); $this->assertEquals($secondary_panel->getLegacyComponent(), $legacy); @@ -102,7 +102,7 @@ public function testGetLegacyComponent(): void public function testWithActions(): void { - $legacy = $this->getUIfactory()->legacy()->legacyContent("Legacy content"); + $legacy = $this->getUIfactory()->legacy()->content("Legacy content"); $actions = $this->getUIFactory()->dropdown()->standard(array( $this->getUIFactory()->button()->shy("ILIAS", "https://www.ilias.de"), $this->getUIFactory()->button()->shy("Github", "https://www.github.com") @@ -116,7 +116,7 @@ public function testWithActions(): void public function testWithoutViewControls(): void { - $legacy = $this->getUIfactory()->legacy()->legacyContent("Legacy content"); + $legacy = $this->getUIfactory()->legacy()->content("Legacy content"); $secondary_panel = $this->getUIFactory()->legacyPanel("title", $legacy); $array_vc = $secondary_panel->getViewControls(); @@ -125,7 +125,7 @@ public function testWithoutViewControls(): void public function testWithSortationViewControl(): void { - $legacy = $this->getUIfactory()->legacy()->legacyContent("Legacy content"); + $legacy = $this->getUIfactory()->legacy()->content("Legacy content"); $sort_options = array( 'internal_rating' => 'Best', 'date_desc' => 'Most Recent', @@ -143,7 +143,7 @@ public function testWithSortationViewControl(): void public function testWithPaginationViewControl(): void { - $legacy = $this->getUIfactory()->legacy()->legacyContent("Legacy content"); + $legacy = $this->getUIfactory()->legacy()->content("Legacy content"); $pagination = $this->getUIFactory()->viewControl()->pagination() ->withTargetURL("http://ilias.de", 'page') ->withTotalEntries(98) @@ -160,7 +160,7 @@ public function testWithPaginationViewControl(): void public function testWithSectionViewControl(): void { - $legacy = $this->getUIfactory()->legacy()->legacyContent("Legacy content"); + $legacy = $this->getUIfactory()->legacy()->content("Legacy content"); $back = $this->getUIFactory()->button()->standard("previous", "http://www.ilias.de"); $next = $this->getUIFactory()->button()->standard("next", "http://www.github.com"); $current = $this->getUIFactory()->button()->standard("current", ""); @@ -178,7 +178,7 @@ public function testWithSectionViewControl(): void public function testRenderPanelSecondaryWithActions(): void { - $legacy = $this->getUIfactory()->legacy()->legacyContent("Legacy content"); + $legacy = $this->getUIfactory()->legacy()->content("Legacy content"); $actions = $this->getUIFactory()->dropdown()->standard(array( $this->getUIFactory()->button()->shy("ILIAS", "https://www.ilias.de"), $this->getUIFactory()->button()->shy("Github", "https://www.github.com") @@ -215,7 +215,7 @@ public function testRenderPanelSecondaryWithActions(): void public function testRenderPanelSecondaryWithSortation(): void { - $legacy = $this->getUIfactory()->legacy()->legacyContent("Legacy content"); + $legacy = $this->getUIfactory()->legacy()->content("Legacy content"); $sort_options = array( 'a' => 'A', 'b' => 'B' @@ -255,7 +255,7 @@ public function testRenderPanelSecondaryWithSortation(): void public function testRenderPanelSecondaryWithPagination(): void { - $legacy = $this->getUIfactory()->legacy()->legacyContent("Legacy content"); + $legacy = $this->getUIfactory()->legacy()->content("Legacy content"); $pagination = $this->getUIFactory()->viewControl()->pagination() ->withTargetURL('http://ilias.de', 'page') @@ -293,7 +293,7 @@ public function testRenderPanelSecondaryWithPagination(): void public function testRenderPanelSecondaryWithSection(): void { - $legacy = $this->getUIfactory()->legacy()->legacyContent("Legacy content"); + $legacy = $this->getUIfactory()->legacy()->content("Legacy content"); $back = $this->getUIFactory()->button()->standard("previous", "http://www.ilias.de"); $next = $this->getUIFactory()->button()->standard("next", "http://www.github.com"); $current = $this->getUIFactory()->button()->standard("current", ""); @@ -325,7 +325,7 @@ public function testRenderPanelSecondaryWithSection(): void public function testRenderPanelSecondaryWithFooter(): void { - $legacy = $this->getUIfactory()->legacy()->legacyContent("Legacy content"); + $legacy = $this->getUIfactory()->legacy()->content("Legacy content"); $footer_shy_button = $this->getUIFactory()->button()->shy("Action", ""); $secondary_panel = $this->getUIFactory()->legacyPanel("Title", $legacy) @@ -352,7 +352,7 @@ public function testRenderPanelSecondaryWithFooter(): void public function testRenderPanelSecondaryWithNoHeader(): void { - $legacy = $this->getUIfactory()->legacy()->legacyContent("Legacy content"); + $legacy = $this->getUIfactory()->legacy()->content("Legacy content"); $secondary_panel = $this->getUIFactory()->legacyPanel("", $legacy); diff --git a/components/ILIAS/UI/tests/Component/Panel/PanelTest.php b/components/ILIAS/UI/tests/Component/Panel/PanelTest.php index b2167fa71dd0..c7521014e727 100755 --- a/components/ILIAS/UI/tests/Component/Panel/PanelTest.php +++ b/components/ILIAS/UI/tests/Component/Panel/PanelTest.php @@ -168,7 +168,7 @@ public function testSubWithSecondaryPanel(): void $p = $fp->sub("Title", array(new ComponentDummy())); - $legacy = new I\Component\Legacy\LegacyContent("Legacy content", new SignalGenerator()); + $legacy = new I\Component\Legacy\Content("Legacy content", new SignalGenerator()); $secondary = new I\Component\Panel\Secondary\Legacy("Legacy panel title", $legacy); $p = $p->withFurtherInformation($secondary); @@ -295,7 +295,7 @@ public function testRenderSubWithSecondaryPanel(): void $r = $this->getDefaultRenderer(); $p = $fp->sub("Title", array()); - $legacy = new I\Component\Legacy\LegacyContent("Legacy content", new SignalGenerator()); + $legacy = new I\Component\Legacy\Content("Legacy content", new SignalGenerator()); $secondary = new I\Component\Panel\Secondary\Legacy("Legacy panel title", $legacy); $p = $p->withFurtherInformation($secondary); $html = $r->render($p); diff --git a/components/ILIAS/UI/tests/Component/Popover/PopoverTest.php b/components/ILIAS/UI/tests/Component/Popover/PopoverTest.php index ccaec628bc0d..8f782c4939db 100755 --- a/components/ILIAS/UI/tests/Component/Popover/PopoverTest.php +++ b/components/ILIAS/UI/tests/Component/Popover/PopoverTest.php @@ -75,7 +75,7 @@ public function testWithPosition(): void public function testRenderStandard(): void { $factory = new I\Component\Popover\Factory(new I\Component\SignalGenerator()); - $popover = $factory->standard($this->getFactory()->legacy()->legacyContent('myContent')); + $popover = $factory->standard($this->getFactory()->legacy()->content('myContent')); $expected = $this->normalizeHTML($this->getExpectedStandardHTML('myContent')); $actual = $this->normalizeHTML($this->getDefaultRenderer()->render($popover)); $this->assertEquals($expected, $actual); @@ -90,7 +90,7 @@ public function testRenderListing(): void public function testRenderAsync(): void { $factory = new I\Component\Popover\Factory(new I\Component\SignalGenerator()); - $popover = $factory->standard($this->getFactory()->legacy()->legacyContent('myContent'))->withAsyncContentUrl('/blub/'); + $popover = $factory->standard($this->getFactory()->legacy()->content('myContent'))->withAsyncContentUrl('/blub/'); $this->assertEquals('', $this->getDefaultRenderer()->render($popover)); } diff --git a/components/ILIAS/UI/tests/UITestHelperTest.php b/components/ILIAS/UI/tests/UITestHelperTest.php index 24d199d28141..a8a7695c2879 100755 --- a/components/ILIAS/UI/tests/UITestHelperTest.php +++ b/components/ILIAS/UI/tests/UITestHelperTest.php @@ -51,7 +51,7 @@ public function testGetMainTemplate(): void public function testRenderExample(): void { $helper = new UITestHelper(); - $c = $helper->factory()->legacy()->legacyContent("hello world"); + $c = $helper->factory()->legacy()->content("hello world"); $this->assertEquals("hello world", $helper->renderer()->render($c)); } } diff --git a/components/ILIAS/UIComponent/Explorer2/classes/class.ilExplorerSelectInputGUI.php b/components/ILIAS/UIComponent/Explorer2/classes/class.ilExplorerSelectInputGUI.php index 3cff52788a8c..05f923327341 100755 --- a/components/ILIAS/UIComponent/Explorer2/classes/class.ilExplorerSelectInputGUI.php +++ b/components/ILIAS/UIComponent/Explorer2/classes/class.ilExplorerSelectInputGUI.php @@ -260,7 +260,7 @@ protected function getInitializationOnLoadCode(): string { $modal = $this->ui->factory()->modal()->roundtrip( 'placeholder', - $this->ui->factory()->legacy()->legacyContent('
') + $this->ui->factory()->legacy()->content('
') ); $rendered_modal = str_replace( ["\r\n", "\n", "\r"], diff --git a/components/ILIAS/UICore/classes/Screen/PageContentProvider.php b/components/ILIAS/UICore/classes/Screen/PageContentProvider.php index 5a1ad9e7ee55..8bfe3538f1c5 100755 --- a/components/ILIAS/UICore/classes/Screen/PageContentProvider.php +++ b/components/ILIAS/UICore/classes/Screen/PageContentProvider.php @@ -26,7 +26,7 @@ use ILIAS\GlobalScreen\Scope\Layout\Provider\AbstractModificationProvider; use ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts; use ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; use ILIAS\UI\Component\MainControls\Footer; use ILIAS\GlobalScreen\Scope\Layout\Factory\TitleModification; use ILIAS\GlobalScreen\Scope\Layout\Factory\ShortTitleModification; @@ -78,10 +78,10 @@ public function isInterestedInContexts(): ContextCollection public function getContentModification(CalledContexts $screen_context_stack): ?ContentModification { return $this->globalScreen()->layout()->factory()->content()->withModification(function ( - ?LegacyContent $content - ): ?LegacyContent { + ?Content $content + ): ?Content { $ui = $this->dic->ui(); - return $ui->factory()->legacy()->legacyContent( + return $ui->factory()->legacy()->content( $ui->renderer()->render($content) . self::$content ); })->withLowPriority(); diff --git a/components/ILIAS/User/classes/Gallery/class.ilUsersGalleryGUI.php b/components/ILIAS/User/classes/Gallery/class.ilUsersGalleryGUI.php index 189e6c905134..4e536b152c13 100755 --- a/components/ILIAS/User/classes/Gallery/class.ilUsersGalleryGUI.php +++ b/components/ILIAS/User/classes/Gallery/class.ilUsersGalleryGUI.php @@ -20,7 +20,7 @@ use ILIAS\Language\Language; use ILIAS\UI\Factory as UIFactory; -use ILIAS\UI\Component\Legacy\LegacyContent as LegacyComponent; +use ILIAS\UI\Component\Legacy\Content as LegacyComponent; use ILIAS\UI\Component\Card\Standard as StandardCard; use ILIAS\UI\Component\Image\Image as Image; use ILIAS\UI\Renderer; diff --git a/components/ILIAS/User/classes/Settings/class.ilUserPrivacySettingsGUI.php b/components/ILIAS/User/classes/Settings/class.ilUserPrivacySettingsGUI.php index e3e5e8e8339e..054adfc8f8f5 100755 --- a/components/ILIAS/User/classes/Settings/class.ilUserPrivacySettingsGUI.php +++ b/components/ILIAS/User/classes/Settings/class.ilUserPrivacySettingsGUI.php @@ -130,7 +130,7 @@ public function showPrivacySettings( $pub_profile = new ilPublicUserProfileGUI($user->getId()); if ($this->profile_mode->isEnabled()) { - $pub_profile_legacy = $this->uifactory->legacy()->legacyContent($pub_profile->getEmbeddable()); + $pub_profile_legacy = $this->uifactory->legacy()->content($pub_profile->getEmbeddable()); $html .= $this->uiRenderer->render($this->uiFactory->panel()->standard( $this->lng->txt('user_profile_preview'), $pub_profile_legacy diff --git a/components/ILIAS/WOPI/classes/Embed/EmbeddedApplicationPagePartProvider.php b/components/ILIAS/WOPI/classes/Embed/EmbeddedApplicationPagePartProvider.php index b85f8e7c938b..65cba0b740b7 100644 --- a/components/ILIAS/WOPI/classes/Embed/EmbeddedApplicationPagePartProvider.php +++ b/components/ILIAS/WOPI/classes/Embed/EmbeddedApplicationPagePartProvider.php @@ -23,7 +23,7 @@ use ILIAS\UI\Component\MainControls\MainBar; use ILIAS\UI\Component\MainControls\MetaBar; use ILIAS\GlobalScreen\Scope\Layout\Provider\PagePart\PagePartProvider; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; use ILIAS\UI\Component\Breadcrumbs\Breadcrumbs; use ILIAS\UI\Component\Image\Image; use ILIAS\UI\Component\MainControls\Footer; @@ -40,7 +40,7 @@ public function __construct( ) { } - public function getContent(): ?LegacyContent + public function getContent(): ?Content { return $this->page_part_provider->getContent(); } diff --git a/components/ILIAS/WOPI/classes/Embed/Renderer.php b/components/ILIAS/WOPI/classes/Embed/Renderer.php index ad8ddf98cbeb..e27c1283118e 100755 --- a/components/ILIAS/WOPI/classes/Embed/Renderer.php +++ b/components/ILIAS/WOPI/classes/Embed/Renderer.php @@ -42,6 +42,6 @@ public function getComponent(): \ILIAS\UI\Component\Component $tpl->setVariable('TOKEN', (string) $this->embedded_application->getToken()); $tpl->setVariable('TTL', (string) (time() + $this->embedded_application->getTTL()) * 1000); // in milliseconds - return $this->ui_factory->legacy()->legacyContent($tpl->get()); + return $this->ui_factory->legacy()->content($tpl->get()); } } diff --git a/components/ILIAS/WebDAV/classes/mount_instructions/class.ilWebDAVMountInstructionsGUI.php b/components/ILIAS/WebDAV/classes/mount_instructions/class.ilWebDAVMountInstructionsGUI.php index a479ef29c0a5..7d043a8637fc 100755 --- a/components/ILIAS/WebDAV/classes/mount_instructions/class.ilWebDAVMountInstructionsGUI.php +++ b/components/ILIAS/WebDAV/classes/mount_instructions/class.ilWebDAVMountInstructionsGUI.php @@ -54,7 +54,7 @@ public function buildGUIFromGivenMountInstructions(array $mount_instructions, bo $components = []; - $js_function_legacy = $f->legacy()->legacyContent(''); if (count($mount_instructions) === 1) { - $content = $f->legacy()->legacyContent("
" . array_shift($mount_instructions) . "
"); + $content = $f->legacy()->content("
" . array_shift($mount_instructions) . "
"); return $render_async ? $r->renderAsync($content) : $r->render($content); } @@ -89,7 +89,7 @@ public function buildGUIFromGivenMountInstructions(array $mount_instructions, bo $hidden = 'style="display: none;"'; } - $legacy = $f->legacy()->legacyContent("
$text
") + $legacy = $f->legacy()->content("
$text
") ->withCustomSignal($title, "il.UI.showMountInstructions(event, '$title');"); $view_control_actions[$title] = $legacy->getCustomSignal($title); @@ -101,9 +101,9 @@ public function buildGUIFromGivenMountInstructions(array $mount_instructions, bo // Add view control and legacy add the beginning of the array (so they will be rendered first) $header_components = [ - $f->legacy()->legacyContent("
"), + $f->legacy()->content("
"), $view_control, - $f->legacy()->legacyContent("
"), + $f->legacy()->content("
"), $js_function_legacy]; $components = array_merge($header_components, $components); diff --git a/components/ILIAS/WebServices/ECS/test/ilECSUserTest.php b/components/ILIAS/WebServices/ECS/test/ilECSUserTest.php index dbfb094463b4..79eba4253a5c 100755 --- a/components/ILIAS/WebServices/ECS/test/ilECSUserTest.php +++ b/components/ILIAS/WebServices/ECS/test/ilECSUserTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); use ILIAS\DI\Container; -use ILIAS\UI\Component\Legacy\LegacyContent; +use ILIAS\UI\Component\Legacy\Content; use ILIAS\UI\Factory; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; diff --git a/components/ILIAS/WorkspaceFolder/classes/class.ilWorkspaceContentGUI.php b/components/ILIAS/WorkspaceFolder/classes/class.ilWorkspaceContentGUI.php index 418fd6dce20b..4fd8125e63e6 100755 --- a/components/ILIAS/WorkspaceFolder/classes/class.ilWorkspaceContentGUI.php +++ b/components/ILIAS/WorkspaceFolder/classes/class.ilWorkspaceContentGUI.php @@ -100,7 +100,7 @@ public function render(): string return ""; } - $leg = $this->ui->factory()->legacy()->legacyContent($html); + $leg = $this->ui->factory()->legacy()->content($html); $panel = $this->ui->factory()->panel()->standard($this->lng->txt("content"), [$leg]);