/** * Loads a user group by its remote ID * * @return \eZ\Publish\Core\REST\Server\Values\RestUserGroup */ public function loadUserGroupByRemoteId() { $contentInfo = $this->contentService->loadContentInfoByRemoteId($this->request->query->get('remoteId')); $userGroup = $this->userService->loadUserGroup($contentInfo->id); $userGroupLocation = $this->locationService->loadLocation($contentInfo->mainLocationId); $contentType = $this->contentTypeService->loadContentType($contentInfo->contentTypeId); return new Values\RestUserGroup($userGroup, $contentType, $contentInfo, $userGroupLocation, $this->contentService->loadRelations($userGroup->getVersionInfo())); }
/** * Loads a content info object for the given remoteId. * * To load fields use loadContent * * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the user is not allowed to read the content * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException - if the content with the given remote id does not exist * * @param string $remoteId * * @return \eZ\Publish\API\Repository\Values\Content\ContentInfo */ public function loadContentInfoByRemoteId($remoteId) { return $this->service->loadContentInfoByRemoteId($remoteId); }
public function loadContentInfoByRemoteId($remoteId) { $contentInfo = $this->contentService->loadContentInfoByRemoteId($remoteId); return $this->loadContentInfo($contentInfo->id); }