Copied!

VersionInfo

VersionInfo.php : 32
Abstract
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 : 36
public mixed STATUS_ARCHIVED = 3

publicSTATUS_DRAFT

VersionInfo.php : 34
public mixed STATUS_DRAFT = 0

publicSTATUS_PUBLISHED

VersionInfo.php : 35
public mixed STATUS_PUBLISHED = 1

Properties

public $contentInfo read-only

VersionInfo.php
public ContentInfo $contentInfo

calls getContentInfo()

protected $creationDate

VersionInfo.php : 63
protected DateTimeInterface $creationDate

protected $creatorId

VersionInfo.php : 61

Creator user ID.

protected int $creatorId

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

protected $id

VersionInfo.php : 41

Version ID.

protected int $id

protected $initialLanguageCode

VersionInfo.php : 73

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

protected string $initialLanguageCode

protected $languageCodes

VersionInfo.php : 82

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 : 54

the last modified date of this version.

protected DateTimeInterface $modificationDate

protected $status

VersionInfo.php : 68

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

protected int $status = self::STATUS_DRAFT

protected $versionNo

VersionInfo.php : 49

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 : 32

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> [] -

publicgetContentInfo()

VersionInfo.php : 89

Content of the content this version belongs to.

public abstract getContentInfo() : ContentInfo

Return values

ContentInfo

publicgetCreator()

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

Return values

User

publicgetInitialLanguage()

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

Return values

Language

publicgetLanguageCodes()

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

Return values

array<string|int, string>

publicgetLanguages()

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

Return values

array<string|int, Language>

publicgetVersionNo()

VersionInfo.php : 108
public getVersionNo() : int

Return values

int

publicisArchived()

VersionInfo.php : 138

Returns true if version is archived.

public isArchived() : bool

Return values

bool

publicisDraft()

VersionInfo.php : 118

Returns true if version is a draft.

public isDraft() : bool

Return values

bool

publicisPublished()

VersionInfo.php : 128

Returns true if version is published.

public isPublished() : bool

Return values

bool

protectedgetProperties()

ValueObject.php : 53

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>

Attributes
#[Ignore]