Copied!

VersionInfo

VersionInfo.php : 31
Extends ValueObject
Implements MultiLanguageName

This class holds version information data.

It also contains the corresponding Content to which the version belongs to.

Constants

publicSTATUS_ARCHIVED

VersionInfo.php : 35
public mixed STATUS_ARCHIVED = 3

publicSTATUS_DRAFT

VersionInfo.php : 33
public mixed STATUS_DRAFT = 0

publicSTATUS_PUBLISHED

VersionInfo.php : 34
public mixed STATUS_PUBLISHED = 1

Properties

public $contentInfo read-only

VersionInfo.php
public ContentInfo $contentInfo

calls getContentInfo()

public $creationDate read-only

VersionInfo.php
public DateTime $creationDate

the creation date of this version

public $creatorId read-only

VersionInfo.php
public mixed $creatorId

the user id of the user which created this version

public $id read-only

VersionInfo.php
public mixed $id

the internal id of the version

public $initialLanguageCode read-only

VersionInfo.php
public string $initialLanguageCode

the language code of the version. This value is used to flag a version as a translation to specific language

public $languageCodes read-only

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

a collection of all languages which exist in this version.

public $modificationDate read-only

VersionInfo.php
public DateTime $modificationDate

the last modified date of this version

public $status read-only

VersionInfo.php
public int $status

the status of this version. One of VersionInfo::STATUS_DRAFT, VersionInfo::STATUS_PUBLISHED, VersionInfo::STATUS_ARCHIVED

public $versionNo read-only

VersionInfo.php
public int $versionNo

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

protected $creationDate

VersionInfo.php : 71
protected DateTime $creationDate

protected $creatorId

VersionInfo.php : 68

Creator user ID.

protected mixed $creatorId

Creator of the version, in the search API this is referred to as the modifier of the published content.

protected $id

VersionInfo.php : 42

Version ID.

protected mixed $id

protected $initialLanguageCode

VersionInfo.php : 85

In 4.x this is the language code which is used for labeling a translation.

protected string $initialLanguageCode

protected $languageCodes

VersionInfo.php : 94

List of languages in this version.

protected array<string|int, string> $languageCodes = []

Reflects which languages fields exists in for this version.

protected $modificationDate

VersionInfo.php : 59

the last modified date of this version.

protected DateTime $modificationDate

protected $status

VersionInfo.php : 78

One of VersionInfo::STATUS_DRAFT, VersionInfo::STATUS_PUBLISHED, VersionInfo::STATUS_ARCHIVED.

protected int $status

Constant.

protected $versionNo

VersionInfo.php : 52

Version number.

protected int $versionNo

In contrast to VersionInfo::$id, this is the version number, which only increments in scope of a single Content object.

Methods

public__construct()

ValueObject.php : 30

Construct object optionally with a set of properties.

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

Readonly properties values must be set using $properties as they are not writable anymore after object has been created.

Parameters

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

publicgetContentInfo()

VersionInfo.php : 101

Content of the content this version belongs to.

public abstract getContentInfo() : ContentInfo

Return values

ContentInfo

publicgetCreator()

VersionInfo.php : 103
public abstract getCreator() : User

Return values

User

publicgetInitialLanguage()

VersionInfo.php : 105
public abstract getInitialLanguage() : Language

Return values

Language

publicgetLanguageCodes()

VersionInfo.php : 115
public getLanguageCodes() : array<string|int, string>

Return values

array<string|int, string>

publicgetLanguages()

VersionInfo.php : 110
public abstract getLanguages() : array<string|int, Language>

Return values

array<string|int, Language>

publicgetVersionNo()

VersionInfo.php : 120
public getVersionNo() : int

Return values

int

publicisArchived()

VersionInfo.php : 150

Returns true if version is archived.

public isArchived() : bool

Return values

bool

publicisDraft()

VersionInfo.php : 130

Returns true if version is a draft.

public isDraft() : bool

Return values

bool

publicisPublished()

VersionInfo.php : 140

Returns true if version is published.

public isPublished() : bool

Return values

bool

protectedgetProperties()

ValueObject.php : 50

Function where list of properties are returned.

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

Used by attributes(), override to add dynamic properties

Parameters

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

Additional dynamic properties exposed on the object

Return values

array<string|int, mixed>