protected function createContentDraft() { $contentTypeService = $this->repository->getContentTypeService(); $contentService = $this->repository->getContentService(); $locationService = $this->repository->getLocationService(); $contentCreateStruct = $contentService->newContentCreateStruct($contentTypeService->loadContentType(3), 'eng-GB'); $contentCreateStruct->sectionId = 1; $contentCreateStruct->ownerId = 14; $contentCreateStruct->setField('name', 'New group'); $contentCreateStruct->setField('description', 'New group description'); $locationCreateStruct = $locationService->newLocationCreateStruct(5); return $contentService->createContent($contentCreateStruct, array($locationCreateStruct)); }