-
-
Save MarcosLoureiro/fcb217f5a1dfa31684f1 to your computer and use it in GitHub Desktop.
Script used for the issue EZP-21149
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function testEzp21149() | |
{ | |
$contentTypeService = $this->repo->getContentTypeService(); | |
$newClass = $contentTypeService->newContentTypeCreateStruct( 'single_user' ); | |
$newClass->mainLanguageCode = "eng-GB"; | |
// $newClass->names = array( "eng-GB" => "Single User" ); | |
$defUserOne = $contentTypeService->newFieldDefinitionCreateStruct( 'user_one' , "ezuser" ); | |
$defUserOne->names = array( "eng-GB" => "User One" ); | |
$defUserOne->position = 1; | |
$newClass->addFieldDefinition( $defUserOne ); | |
$newClass->addFieldDefinition( $defUserTwo ); | |
$contentTypeService->createContentType( | |
$newClass, | |
array( $contentTypeService->loadContentTypeGroupByIdentifier( 'Content' ) ) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment