Details
-
Story
-
Resolution: Unresolved
-
Medium
-
None
-
1.10.1
-
None
Description
As a eZ Platform Developer, I would like to be able to create a copy of a Location (not the whole subtree) in a single API call.
$newlocation = $locationService->copyLocation($location, $parentLocation);
at the moment to do that, you need to use the ContentService. And it takes quite a lot of line to write and also a lot of Mocks to test
$locationCreateStruct = $this->locationService->newLocationCreateStruct( $newParentLocationId ); $copiedContent = $this->contentService->copyContent( $currentLocation->contentInfo, $locationCreateStruct ); $newLocation = $this->locationService->loadLocation( $copiedContent->contentInfo->mainLocationId );
To see a real life usage (with Phpspec tests): https://github.com/ezsystems/hybrid-platform-ui/pull/98
Attachments
Issue Links
- discovered while testing
-
EZP-27672 Copy a content item using Action Bar
- Closed