public newUserGroupCreateStruct ( string $mainLanguageCode, null | eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType = null ) : eZ\Publish\API\Repository\Values\User\UserGroupCreateStruct | ||
$mainLanguageCode | string | The main language for the underlying content object |
$contentType | null | eZ\Publish\API\Repository\Values\ContentType\ContentType | 5.x the content type for the underlying content object. In 4.x it is ignored and taken from the configuration |
return | eZ\Publish\API\Repository\Values\User\UserGroupCreateStruct |
public function newUserGroupCreateStruct($mainLanguageCode, $contentType = null)
{
if ($contentType === null) {
$contentType = $this->repository->getContentTypeService()->loadContentType($this->settings['userGroupClassID']);
}
return new UserGroupCreateStruct(array('contentType' => $contentType, 'mainLanguageCode' => $mainLanguageCode, 'fields' => array()));
}