Copied!

ContentTypeDraft

ContentTypeDraft.php : 14
Abstract
Extends ContentType

This class represents a draft of a content type.

Constants

publicSTATUS_DEFINED

ContentType.php : 40
public int STATUS_DEFINED = 0

Status constant for defined (aka "published") Type

publicSTATUS_DRAFT

ContentType.php : 43
public int STATUS_DRAFT = 1

Status constant for draft (aka "temporary") Type

publicSTATUS_MODIFIED

ContentType.php : 46
public int STATUS_MODIFIED = 2

Status constant for modified (aka "deferred for publishing") Type

Properties

public $contentTypeGroups read-only

ContentType.php
public array<string|int, ContentTypeGroup$contentTypeGroups

calls getContentTypeGroups

public $creationDate read-only

ContentType.php
public DateTime $creationDate

the date of the creation of this content type

public $creatorId read-only

ContentType.php
public mixed $creatorId

the user id of the creator of this content type

public $defaultAlwaysAvailable read-only

ContentType.php
public bool $defaultAlwaysAvailable

if an instance of a content type is created the always available flag is set by default this this value.

public $defaultSortField read-only

ContentType.php
public int $defaultSortField

Specifies which property the child locations should be sorted on by default when created. Valid values are found at

public $defaultSortOrder read-only

ContentType.php
public int $defaultSortOrder

Specifies whether the sort order should be ascending or descending by default when created. Valid values are

public $fieldDefinitions read-only

ContentType.php
public FieldDefinitionCollection $fieldDefinitions

calls getFieldDefinitions() or on access getFieldDefinition($fieldDefIdentifier)

public $id read-only

ContentType.php
public mixed $id

the id of the content type

public $identifier read-only

ContentType.php
public string $identifier

@deprecated 4.6.7 accessing magic getter is deprecated and will be removed in 5.0.0. Use ContentType::getIdentifier() instead.

public $isContainer read-only

ContentType.php
public bool $isContainer

@deprecated use strict getter ContentType::isContainer instead.

public $languageCodes read-only

ContentType.php
public array<string|int, string> $languageCodes

array of language codes used by content type translations.

public $mainLanguageCode read-only

ContentType.php
public string $mainLanguageCode

the main language of the content type names and description used for fallback.

public $modificationDate read-only

ContentType.php
public DateTime $modificationDate

the date of the last modification of this content type

public $modifierId read-only

ContentType.php
public mixed $modifierId

the user id of the user which has last modified this content type

public $nameSchema read-only

ContentType.php
public string $nameSchema

The name schema.

public $remoteId read-only

ContentType.php
public string $remoteId

a global unique id of the content object

public $status read-only

ContentType.php
public int $status

the status of the content type. One of ContentType::STATUS_DEFINED|ContentType::STATUS_DRAFT|ContentType::STATUS_MODIFIED

public $urlAliasSchema read-only

ContentType.php
public string $urlAliasSchema

URL alias schema. If nothing is provided, $nameSchema will be used instead.

Methods

public__construct()

ValueObject.php : 31

Construct object optionally with a set of properties.

public __construct([array<string, mixed> $properties = [] ])

Readonly properties values must be set using $properties as they aren't writable anymore after object has been created.

Parameters

Name Type Default value Description
$properties array<string, mixed> [] -

publicgetContentTypeGroups()

ContentType.php : 172

This method returns the content type groups this content type is assigned to.

public abstract getContentTypeGroups() : array<string|int, ContentTypeGroup>

Return values

array<string|int, ContentTypeGroup>

publicgetFieldDefinition()

ContentType.php : 191

This method returns the field definition for the given identifier.

public getFieldDefinition(string $fieldDefinitionIdentifier) : FieldDefinition|null

Parameters

Name Type Default value Description
$fieldDefinitionIdentifier string - -

Return values

FieldDefinition|null

publicgetFieldDefinitions()

ContentType.php : 177

This method returns the content type field definitions from this type.

public abstract getFieldDefinitions() : FieldDefinitionCollection

Return values

FieldDefinitionCollection

publicgetFieldDefinitionsOfType()

ContentType.php : 219

Returns collection of the field definition for the given field type identifier.

public getFieldDefinitionsOfType(string $fieldTypeIdentifier) : FieldDefinitionCollection

Parameters

Name Type Default value Description
$fieldTypeIdentifier string - -

Return values

FieldDefinitionCollection

publicgetFirstFieldDefinitionOfType()

ContentType.php : 227

Returns true if field definition with given field type identifier or null.

public getFirstFieldDefinitionOfType(string $fieldTypeIdentifier) : FieldDefinition|null

Parameters

Name Type Default value Description
$fieldTypeIdentifier string - -

Return values

FieldDefinition|null

publicgetIdentifier()

ContentType.php : 179
public getIdentifier() : string

Return values

string

publichasFieldDefinition()

ContentType.php : 203

This method returns true if the field definition for the given identifier exists.

public hasFieldDefinition(string $fieldDefinitionIdentifier) : bool

Parameters

Name Type Default value Description
$fieldDefinitionIdentifier string - -

Return values

bool

publichasFieldDefinitionOfType()

ContentType.php : 211

Returns true if field definition with given field type identifier exists.

public hasFieldDefinitionOfType(string $fieldTypeIdentifier) : bool

Parameters

Name Type Default value Description
$fieldTypeIdentifier string - -

Return values

bool

publicisContainer()

ContentType.php : 237
public isContainer() : bool

Return values

bool

protectedgetProperties()

ValueObject.php : 54

Returns list of available properties' names.

protected getProperties([array<int, string> $dynamicProperties = [] ]) : array<int, string>

Override to add dynamic properties.

Parameters

Name Type Default value Description
$dynamicProperties array<int, string> []

Additional dynamic properties exposed on the object

Return values

array<int, string>

Tags
Serializerignore

()