public function loadContentTypeDraft($contentTypeId) { $spiContentType = $this->contentTypeHandler->load($contentTypeId, SPIContentType::STATUS_DRAFT); if ($spiContentType->modifierId != $this->repository->getCurrentUserReference()->getUserId()) { throw new NotFoundException('ContentType owned by someone else', $contentTypeId); } return $this->contentTypeDomainMapper->buildContentTypeDraftDomainObject($spiContentType, array_map(function ($id) { return $this->contentTypeHandler->loadGroup($id); }, $spiContentType->groupIds)); }