protected function createGroups()
{
if (empty($this->contentTypeGroups)) {
$contentTypeService = $this->repository->getContentTypeService();
$groupCreate = $contentTypeService->newContentTypeGroupCreateStruct('first-group');
$groupCreate->creatorId = $this->repository->getCurrentUserReference()->getUserId();
$groupCreate->creationDate = new \DateTime();
// @todo uncomment when support for multilingual names and descriptions is added EZP-24776
//$groupCreate->mainLanguageCode = 'de_DE';
//$groupCreate->names = array( 'en_US' => 'A name.' );
//$groupCreate->descriptions = array( 'en_US' => 'A description.' );
$this->contentTypeGroups[] = $contentTypeService->createContentTypeGroup($groupCreate);
$groupCreate->identifier = 'second-group';
$this->contentTypeGroups[] = $contentTypeService->createContentTypeGroup($groupCreate);
}
return $this->contentTypeGroups;
}