diff --git a/Classes/Controller/BackendController.php b/Classes/Controller/BackendController.php index c785ddc95b..2016cc38d2 100644 --- a/Classes/Controller/BackendController.php +++ b/Classes/Controller/BackendController.php @@ -151,14 +151,11 @@ public function indexAction(string $node = null) } $contentGraph = $contentRepository->getContentGraph($workspace->workspaceName); - $backendControllerInternals = $this->contentRepositoryRegistry->buildService( - $siteDetectionResult->contentRepositoryId, - new BackendControllerInternalsFactory() - ); - $defaultDimensionSpacePoint = $backendControllerInternals->getDefaultDimensionSpacePoint(); + $rootDimensionSpacePoints = $contentRepository->getVariationGraph()->getRootGeneralizations(); + $arbitraryRootDimensionSpacePoint = array_shift($rootDimensionSpacePoints); $subgraph = $contentGraph->getSubgraph( - $nodeAddress ? $nodeAddress->dimensionSpacePoint : $defaultDimensionSpacePoint, + $nodeAddress ? $nodeAddress->dimensionSpacePoint : $arbitraryRootDimensionSpacePoint, VisibilityConstraints::withoutRestrictions() ); @@ -170,7 +167,7 @@ public function indexAction(string $node = null) if (!$rootNodeAggregate) { throw new \RuntimeException(sprintf('No sites root node found in content repository "%s", while fetching site node "%s"', $contentRepository->id->value, $siteDetectionResult->siteNodeName->value), 1724849303); } - $rootNode = $rootNodeAggregate->getNodeByCoveredDimensionSpacePoint($defaultDimensionSpacePoint); + $rootNode = $rootNodeAggregate->getNodeByCoveredDimensionSpacePoint($arbitraryRootDimensionSpacePoint); $siteNode = $subgraph->findNodeByPath( $siteDetectionResult->siteNodeName->toNodeName(), diff --git a/Classes/Controller/BackendControllerInternals.php b/Classes/Controller/BackendControllerInternals.php deleted file mode 100644 index 21f55a0a99..0000000000 --- a/Classes/Controller/BackendControllerInternals.php +++ /dev/null @@ -1,38 +0,0 @@ -interDimensionalVariationGraph->getRootGeneralizations(); - $arbitraryRootDimensionSpacePoint = array_shift($rootDimensionSpacePoints); - return $arbitraryRootDimensionSpacePoint; - } -} diff --git a/Classes/Controller/BackendControllerInternalsFactory.php b/Classes/Controller/BackendControllerInternalsFactory.php deleted file mode 100644 index bb9bf3752b..0000000000 --- a/Classes/Controller/BackendControllerInternalsFactory.php +++ /dev/null @@ -1,34 +0,0 @@ - - * @internal - */ -class BackendControllerInternalsFactory implements ContentRepositoryServiceFactoryInterface -{ - public function build( - ContentRepositoryServiceFactoryDependencies $serviceFactoryDependencies - ): BackendControllerInternals { - return new BackendControllerInternals( - $serviceFactoryDependencies->interDimensionalVariationGraph - ); - } -} diff --git a/Classes/Fusion/Helper/ContentDimensionsHelper.php b/Classes/Fusion/Helper/ContentDimensionsHelper.php index de1f90591c..b2f2da6ddf 100644 --- a/Classes/Fusion/Helper/ContentDimensionsHelper.php +++ b/Classes/Fusion/Helper/ContentDimensionsHelper.php @@ -36,10 +36,8 @@ class ContentDimensionsHelper implements ProtectedContextAwareInterface */ public function contentDimensionsByName(ContentRepositoryId $contentRepositoryId): array { - $contentDimensionHelperInternals = $this->contentRepositoryRegistry->buildService($contentRepositoryId, new ContentDimensionsHelperInternalsFactory()); - assert($contentDimensionHelperInternals instanceof ContentDimensionsHelperInternals); - $contentDimensionSource = $contentDimensionHelperInternals->contentDimensionSource; - + $contentDimensionSource = $this->contentRepositoryRegistry->get($contentRepositoryId) + ->getContentDimensionSource(); $dimensions = $contentDimensionSource->getContentDimensionsOrderedByPriority(); $result = []; @@ -72,8 +70,8 @@ public function contentDimensionsByName(ContentRepositoryId $contentRepositoryId */ public function allowedPresetsByName(DimensionSpacePoint $dimensions, ContentRepositoryId $contentRepositoryId): array|object { - $contentDimensionHelperInternals = $this->contentRepositoryRegistry->buildService($contentRepositoryId, new ContentDimensionsHelperInternalsFactory()); - $contentDimensionSource = $contentDimensionHelperInternals->contentDimensionSource; + $contentDimensionSource = $this->contentRepositoryRegistry->get($contentRepositoryId) + ->getContentDimensionSource(); // TODO: re-implement this here; currently EVERYTHING is allowed!! $allowedPresets = []; diff --git a/Classes/Fusion/Helper/ContentDimensionsHelperInternals.php b/Classes/Fusion/Helper/ContentDimensionsHelperInternals.php deleted file mode 100644 index 8aa3e78206..0000000000 --- a/Classes/Fusion/Helper/ContentDimensionsHelperInternals.php +++ /dev/null @@ -1,28 +0,0 @@ - - * @todo EEL helpers are still to be declared as internal - */ -class ContentDimensionsHelperInternalsFactory implements ContentRepositoryServiceFactoryInterface -{ - public function build(ContentRepositoryServiceFactoryDependencies $serviceFactoryDependencies): ContentDimensionsHelperInternals - { - return new ContentDimensionsHelperInternals($serviceFactoryDependencies->contentDimensionSource); - } -}