diff --git a/Content/ContentTypeResolver/PageSelectionResolver.php b/Content/ContentTypeResolver/PageSelectionResolver.php index dd227a5..00af738 100644 --- a/Content/ContentTypeResolver/PageSelectionResolver.php +++ b/Content/ContentTypeResolver/PageSelectionResolver.php @@ -15,6 +15,7 @@ use Sulu\Bundle\HeadlessBundle\Content\ContentView; use Sulu\Bundle\HeadlessBundle\Content\Serializer\PageSerializerInterface; +use Sulu\Bundle\PageBundle\Content\PageSelectionContainer; use Sulu\Component\Content\Compat\PropertyInterface; use Sulu\Component\Content\Compat\PropertyParameter; @@ -55,6 +56,9 @@ public function resolve($data, PropertyInterface $property, string $locale, arra $property->getParams() ); + // the PageSelectionContainer resolves the data defined in the $params using the default content types + // for example, this means that the result contains an array of media entities instead of an array of ids + // TODO: find a solution that returns the unresolved data which can be passed to the resolvers of this bundle /** @var mixed[] $pagesData */ $pagesData = $this->pageSelectionContainerFactory->createContainer( $data, diff --git a/Content/DataProviderResolver/PageResolver.php b/Content/DataProviderResolver/PageResolver.php index 5f27b23..4709b6d 100644 --- a/Content/DataProviderResolver/PageResolver.php +++ b/Content/DataProviderResolver/PageResolver.php @@ -68,6 +68,9 @@ public function resolve( int $page = 1, ?int $pageSize = null ): DataProviderResult { + // the PageDataProvider resolves the data defined in the $propertyParameter using the default content types + // for example, this means that the result contains an array of media entities instead of an array of ids + // TODO: find a solution that returns the unresolved data which can be passed to the resolvers of this bundle $providerResult = $this->pageDataProvider->resolveResourceItems( $filters, $propertyParameter,