This class provides all version independent information of the Content object.
Constants¶
                
STATUS_DRAFT        ¶
    
        | 
                     | 
                
                    
                     | 
            
                
STATUS_PUBLISHED        ¶
    
        | 
                     | 
                
                    
                     | 
            
                
STATUS_TRASHED        ¶
    
        | 
                     | 
                
                    
                     | 
            
Properties¶
                
        $alwaysAvailable
            ¶
    
        Indicates if the Content object is shown in the mainlanguage if its not present in an other requested language.
| 
                     | 
                
                    
                     | 
            
                
        $contentType
            ¶
    
        | 
                     | 
                
                    
                     | 
            
                
        $contentTypeId
            ¶
    
        The content type id of the Content object.
| 
                     | 
                
                    
                     | 
            
                
        $currentVersionNo
            ¶
    
        Current Version number is the version number of the published version or the version number of a newly created draft (which is 1).
| 
                     | 
                
                    
                     | 
            
                
        $id
            ¶
    
        The unique id of the Content object.
| 
                     | 
                
                    
                     | 
            
                
        $isHidden
            ¶
    
        | 
                     | 
                
                    
                     | 
            
                
        $mainLanguage
            ¶
    
        | 
                     | 
                
                    
                     | 
            
                
        $mainLanguageCode
            ¶
    
        The main language code of the Content object.
| 
                     | 
                
                    
                     | 
            
                
        $mainLocation
            ¶
    
        | 
                     | 
                
                    
                     | 
            
                
        $mainLocationId
            ¶
    
        Identifier of the main location.
| 
                     | 
                
                    
                     | 
            
If the Content object has multiple locations, $mainLocationId will point to the main one.
                
        $modificationDate
            ¶
    
        Content modification date.
| 
                     | 
                
                    
                     | 
            
                
        $name
            ¶
    
        The computed name (via name schema) in the main language of the Content object.
| 
                     | 
                
                    
                     | 
            
For names in other languages then main see VersionInfo
                
        $owner
            ¶
    
        | 
                     | 
                
                    
                     | 
            
                
        $ownerId
            ¶
    
        The owner of the Content object.
| 
                     | 
                
                    
                     | 
            
                
        $published
            ¶
    
        True if there exists a published version, false otherwise.
| 
                     | 
                
                    
                     | 
            
                
        $publishedDate
            ¶
    
        Content publication date.
| 
                     | 
                
                    
                     | 
            
                
        $remoteId
            ¶
    
        Remote identifier used as a custom identifier for the object.
| 
                     | 
                
                    
                     | 
            
                
        $section
            ¶
    
        | 
                     | 
                
                    
                     | 
            
                
        $sectionId
            ¶
    
        The section to which the Content object is assigned.
| 
                     | 
                
                    
                     | 
            
                
        $status
            ¶
    
        Status of the content.
| 
                     | 
                
                    
                     | 
            
Replaces deprecated API\ContentInfo::$published.
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> | [] | - | 
                
getContentType()
            ¶
    
        | 
                     | 
                
                    
                     | 
            
Return values
                
getId()
            ¶
    
        | 
                     | 
                
                    
                     | 
            
Return values
int
                
getMainLanguage()
            ¶
    
        | 
                     | 
                
                    
                     | 
            
Return values
                
getMainLanguageCode()
            ¶
    
        | 
                     | 
                
                    
                     | 
            
Return values
string
                
getMainLocation()
            ¶
    
        | 
                     | 
                
                    
                     | 
            
Return values
Location|null
                
getMainLocationId()
            ¶
    
        | 
                     | 
                
                    
                     | 
            
Return values
int|null
                
getName()
            ¶
    
        | 
                     | 
                
                    
                     | 
            
Return values
string
                
getOwner()
            ¶
    
        | 
                     | 
                
                    
                     | 
            
Return values
                
getSection()
            ¶
    
        | 
                     | 
                
                    
                     | 
            
Return values
                
getSectionId()
            ¶
    
        | 
                     | 
                
                    
                     | 
            
Return values
int
                
isDraft()
            ¶
    
        | 
                     | 
                
                    
                     | 
            
Return values
bool
                
isHidden()
            ¶
    
        | 
                     | 
                
                    
                     | 
            
Return values
bool
                
isPublished()
            ¶
    
        | 
                     | 
                
                    
                     | 
            
Return values
bool
                
isTrashed()
            ¶
    
        | 
                     | 
                
                    
                     | 
            
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]