Properties
Methods
Parameters
Adds a new field definition to an existing content type.
The content type must be in state DRAFT.
Parameters
Assigns a content type to a content type group.
Parameters
Copy Type incl fields and groupIds to a new Type object.
New Type will have $creator as creator / modifier, created / modified should be updated with current time,
updated remoteId and identifier should be appended with '_' + unique string.
Parameters
Name |
Type |
Default value |
Description |
$contentType
|
ContentType
|
-
|
-
|
$creator
|
User
|
null
|
If null the current-user is used instead
|
Return values
ContentType
Create a content type object.
The content type is created in the state STATUS_DRAFT.
Parameters
Name |
Type |
Default value |
Description |
$contentTypeCreateStruct
|
ContentTypeCreateStruct
|
-
|
-
|
$contentTypeGroups
|
array<string|int, mixed>
|
-
|
Required array of
ContentTypeGroup to link type with (must contain one)
|
Return values
ContentTypeDraft
Creates a draft from an existing content type.
This is a complete copy of the content
type which has the state STATUS_DRAFT.
Parameters
Name |
Type |
Default value |
Description |
$contentType
|
ContentType
|
-
|
-
|
Return values
ContentTypeDraft
Create a content type group object.
Parameters
Return values
ContentTypeGroup
Delete a content type object.
|
public deleteContentType(ContentType $contentType) : void
|
Deletes a content type if it has no instances. If content type in state STATUS_DRAFT is
given, only the draft content type will be deleted. Otherwise, if content type in state
STATUS_DEFINED is given, all content type data will be deleted.
Parameters
Name |
Type |
Default value |
Description |
$contentType
|
ContentType
|
-
|
-
|
Delete a content type group.
This method only deletes an content type group which has content types without any content instances
Parameters
Delete all content type drafs created or modified by the user.
|
public deleteUserDrafts(int $userId) : void
|
Parameters
Name |
Type |
Default value |
Description |
$userId
|
int
|
-
|
-
|
Returns true if the given content type $contentType has content instances.
|
public isContentTypeUsed(ContentType $contentType) : bool
|
Parameters
Name |
Type |
Default value |
Description |
$contentType
|
ContentType
|
-
|
-
|
Return values
bool
Get a content type object by id.
|
public loadContentType(int $contentTypeId[, array<string|int, mixed> $prioritizedLanguages = [] ]) : ContentType
|
Parameters
Name |
Type |
Default value |
Description |
$contentTypeId
|
int
|
-
|
-
|
$prioritizedLanguages
|
array<string|int, mixed>
|
[]
|
Used as prioritized language code on translated properties of returned object.
|
Return values
ContentType
Get a content type object by identifier.
|
public loadContentTypeByIdentifier(string $identifier[, array<string|int, mixed> $prioritizedLanguages = [] ]) : ContentType
|
Parameters
Name |
Type |
Default value |
Description |
$identifier
|
string
|
-
|
-
|
$prioritizedLanguages
|
array<string|int, mixed>
|
[]
|
Used as prioritized language code on translated properties of returned object.
|
Return values
ContentType
Get a content type object by id.
|
public loadContentTypeByRemoteId(string $remoteId[, array<string|int, mixed> $prioritizedLanguages = [] ]) : ContentType
|
Parameters
Name |
Type |
Default value |
Description |
$remoteId
|
string
|
-
|
-
|
$prioritizedLanguages
|
array<string|int, mixed>
|
[]
|
Used as prioritized language code on translated properties of returned object.
|
Return values
ContentType
Get a content type object draft by id.
|
public loadContentTypeDraft(int $contentTypeId[, bool $ignoreOwnership = false ]) : ContentTypeDraft
|
Parameters
Name |
Type |
Default value |
Description |
$contentTypeId
|
int
|
-
|
-
|
$ignoreOwnership
|
bool
|
false
|
if true, method will return draft even if the owner is different than currently logged in user
|
Return values
ContentTypeDraft
Get a content type group object by id.
|
public loadContentTypeGroup(int $contentTypeGroupId[, array<string|int, mixed> $prioritizedLanguages = [] ]) : ContentTypeGroup
|
Parameters
Name |
Type |
Default value |
Description |
$contentTypeGroupId
|
int
|
-
|
-
|
$prioritizedLanguages
|
array<string|int, mixed>
|
[]
|
Used as prioritized language code on translated properties of returned object.
|
Return values
ContentTypeGroup
Get a content type group object by identifier.
|
public loadContentTypeGroupByIdentifier(string $contentTypeGroupIdentifier[, array<string|int, mixed> $prioritizedLanguages = [] ]) : ContentTypeGroup
|
Parameters
Name |
Type |
Default value |
Description |
$contentTypeGroupIdentifier
|
string
|
-
|
-
|
$prioritizedLanguages
|
array<string|int, mixed>
|
[]
|
Used as prioritized language code on translated properties of returned object.
|
Return values
ContentTypeGroup
Get all content type groups.
|
public loadContentTypeGroups([array<string|int, mixed> $prioritizedLanguages = [] ]) : array<string|int, ContentTypeGroup>
|
Parameters
Name |
Type |
Default value |
Description |
$prioritizedLanguages
|
array<string|int, mixed>
|
[]
|
Used as prioritized language code on translated properties of returned object.
|
Return values
array<string|int, ContentTypeGroup>
Bulk-load content type objects by ids.
|
public loadContentTypeList(array<string|int, mixed> $contentTypeIds[, array<string|int, mixed> $prioritizedLanguages = [] ]) : array<string|int, ContentType>|iterable<string|int, mixed>
|
Note: it does not throw exceptions on load, just ignores erroneous items.
Parameters
Name |
Type |
Default value |
Description |
$contentTypeIds
|
array<string|int, mixed>
|
-
|
-
|
$prioritizedLanguages
|
array<string|int, mixed>
|
[]
|
Used as prioritized language code on translated properties of returned object.
|
Return values
array<string|int, ContentType>|iterable<string|int, mixed>
Get content type objects which belong to the given content type group.
|
public loadContentTypes(ContentTypeGroup $contentTypeGroup[, array<string|int, mixed> $prioritizedLanguages = [] ]) : array<string|int, ContentType>
|
Parameters
Name |
Type |
Default value |
Description |
$contentTypeGroup
|
ContentTypeGroup
|
-
|
-
|
$prioritizedLanguages
|
array<string|int, mixed>
|
[]
|
Used as prioritized language code on translated properties of returned object.
|
Return values
array<string|int, ContentType>
Instantiates a new content type create class.
Parameters
Name |
Type |
Default value |
Description |
$identifier
|
string
|
-
|
-
|
Return values
ContentTypeCreateStruct
Instantiates a new content type group create class.
Parameters
Name |
Type |
Default value |
Description |
$identifier
|
string
|
-
|
-
|
Return values
ContentTypeGroupCreateStruct
Instantiates a new content type update struct.
Return values
ContentTypeGroupUpdateStruct
Instantiates a new content type update struct.
Return values
ContentTypeUpdateStruct
Instantiates a field definition create struct.
Parameters
Name |
Type |
Default value |
Description |
$identifier
|
string
|
-
|
the required identifier for the field definition
|
$fieldTypeIdentifier
|
string
|
-
|
the required field type identifier
|
Return values
FieldDefinitionCreateStruct
Instantiates a field definition update class.
Return values
FieldDefinitionUpdateStruct
Publish the content type and update content objects.
This method updates content objects, depending on the changed field definitions.
Parameters
Parameters
Name |
Type |
Default value |
Description |
$contentTypeDraft
|
ContentTypeDraft
|
-
|
-
|
$languageCode
|
string
|
-
|
-
|
Return values
ContentTypeDraft
Remove a field definition from an existing Type.
Parameters
Unassign a content type from a group.
Parameters
Update a content type object.
Parameters
Update a content type group object.
Parameters
Update a field definition.
Parameters