This class holds version information data.
It also contains the corresponding Content to which the version belongs to.
Constants¶
                 STATUS_ARCHIVED        ¶
STATUS_ARCHIVED        ¶
    
        |  |  | 
                 STATUS_DRAFT        ¶
STATUS_DRAFT        ¶
    
        |  |  | 
                 STATUS_PUBLISHED        ¶
STATUS_PUBLISHED        ¶
    
        |  |  | 
Properties¶
                 $contentInfo
            ¶
        $contentInfo
            ¶
    
        |  |  | 
calls getContentInfo()
                 $creationDate
            ¶
        $creationDate
            ¶
    
        |  |  | 
                 $creatorId
            ¶
        $creatorId
            ¶
    
        Creator user ID.
|  |  | 
Creator of the version, in the search API this is referred to as the modifier of the published content.
                 $id
            ¶
        $id
            ¶
    
        Version ID.
|  |  | 
                 $initialLanguageCode
            ¶
        $initialLanguageCode
            ¶
    
        In 4.x this is the language code which is used for labeling a translation.
|  |  | 
                 $languageCodes
            ¶
        $languageCodes
            ¶
    
        List of languages in this version.
|  |  | 
Reflects which languages fields exists in for this version.
                 $modificationDate
            ¶
        $modificationDate
            ¶
    
        the last modified date of this version.
|  |  | 
                 $status
            ¶
        $status
            ¶
    
        One of VersionInfo::STATUS_DRAFT, VersionInfo::STATUS_PUBLISHED, VersionInfo::STATUS_ARCHIVED.
|  |  | 
Constant.
                 $versionNo
            ¶
        $versionNo
            ¶
    
        Version number.
|  |  | 
In contrast to VersionInfo::$id, this is the version number, which only increments in scope of a single Content object.
Methods¶
                 __construct()
            ¶
__construct()
            ¶
    
        Construct object optionally with a set of 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> | [] | - | 
                 getContentInfo()
            ¶
getContentInfo()
            ¶
    
        Content of the content this version belongs to.
|  |  | 
Return values
                 getCreator()
            ¶
getCreator()
            ¶
    
        |  |  | 
Return values
                 getInitialLanguage()
            ¶
getInitialLanguage()
            ¶
    
        |  |  | 
Return values
                 getLanguageCodes()
            ¶
getLanguageCodes()
            ¶
    
        |  |  | 
Return values
array<string|int, string>
                 getLanguages()
            ¶
getLanguages()
            ¶
    
        |  |  | 
Return values
array<string|int, Language>
                 getVersionNo()
            ¶
getVersionNo()
            ¶
    
        |  |  | 
Return values
int
                 isArchived()
            ¶
isArchived()
            ¶
    
        Returns true if version is archived.
|  |  | 
Return values
bool
                 isDraft()
            ¶
isDraft()
            ¶
    
        Returns true if version is a draft.
|  |  | 
Return values
bool
                 isPublished()
            ¶
isPublished()
            ¶
    
        Returns true if version is published.
|  |  | 
Return values
bool
                 getProperties()
            ¶
getProperties()
            ¶
    
        Returns list of available properties' names.
|  |  | 
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>