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