Details
-
Story
-
Resolution: Unresolved
-
High
-
None
-
5.4-dev
-
None
Description
On the path to be able to decouple repository (to be able to configure and extend all parts of it freely), which later can lead to introduction of API cache, there is one feature needed to be able to archive this: DomainTypes.
TL;DR; Makes sure SearchService (Content search) and ContentService load operations return User and User Group which can be used directly for special User domain operations on UserService.
This can be used in the future for Asset Domain, Tag Domain and so on. However in current form a object can only be one type at a type (they are all Content as well currently, but can not be Asset and Tag at the same time). This is probably ok as it forces proper content modeling.
The win of this is to avid having to care about using correct service before you load stuff (so before you know anything about the object your loading), and internally also avoiding having to duplicate load/search apis per type which does not make much sense in eZ Publish.
Quasi Example:
$tag = $searchService->findSingle( Query $complexQueryGoingStraightToElasticSearch ); $tagCloud = $tagService->generateTagCloud( Tag $tag );
as opposed to:
$content = $searchService->findSingle( Query $complexQueryGoingStraightToElasticSearch ); if ( $content->contentTypeId === $tagContentTypeId ) { $tag = $tagService->load( int|string $content->id ); $tagCloud = $tagService->generateTagCloud( Tag $tag ); }
Attachments
Issue Links
- relates to
-
EZP-22485 Allow injection of repository services via DIC
- Declined