this class represents a content object in a specific version.
Constants¶
                
DEFAULT_PASSWORD_HASH        ¶
    
        | 
                     | 
                
                    
                     | 
            
                
PASSWORD_HASH_BCRYPT        ¶
    
        | 
                     | 
                
                    
                     | 
            
                
PASSWORD_HASH_INVALID        ¶
    
        | 
                     | 
                
                    
                     | 
            
                
PASSWORD_HASH_PHP_DEFAULT        ¶
    
        | 
                     | 
                
                    
                     | 
            
                
SUPPORTED_PASSWORD_HASHES        ¶
    
        | 
                     | 
                
                    
                     | 
            
List of supported (by default) hash types.
Properties¶
                
        $contentInfo
            ¶
    
        | 
                     | 
                
                    
                     | 
            
@deprecated 4.6.7 accessing magic getter is deprecated and will be removed in 5.0.0. Use Content::getContentInfo() instead.
                
        $fields
            ¶
    
        | 
                     | 
                
                    
                     | 
            
an array of [field definition identifier => [language code => field value]]
                
        $id
            ¶
    
        | 
                     | 
                
                    
                     | 
            
@deprecated 4.6.7 accessing magic getter is deprecated and will be removed in 5.0.0. Use Content::getId() instead.
                
        $thumbnail
            ¶
    
        | 
                     | 
                
                    
                     | 
            
calls getThumbnail()
                
        $versionInfo
            ¶
    
        | 
                     | 
                
                    
                     | 
            
calls getVersionInfo()
                
        $email
            ¶
    
        | 
                     | 
                
                    
                     | 
            
                
        $enabled
            ¶
    
        Flag to signal if user is enabled or not.
| 
                     | 
                
                    
                     | 
            
User cannot login if false
                
        $hashAlgorithm
            ¶
    
        | 
                     | 
                
                    
                     | 
            
                
        $login
            ¶
    
        | 
                     | 
                
                    
                     | 
            
                
        $maxLogin
            ¶
    
        Max number of time user is allowed to login.
| 
                     | 
                
                    
                     | 
            
Tags
                
        $passwordHash
            ¶
    
        | 
                     | 
                
                    
                     | 
            
                
        $passwordUpdatedAt
            ¶
    
        | 
                     | 
                
                    
                     | 
            
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()
            ¶
    
        | 
                     | 
                
                    
                     | 
            
Return values
                
getContentType()
            ¶
    
        Returns the ContentType for this content.
| 
                     | 
                
                    
                     | 
            
Return values
                
getDefaultLanguageCode()
            ¶
    
        | 
                     | 
                
                    
                     | 
            
Return values
string
                
getField()
            ¶
    
        This method returns the field for a given field definition identifier and language.
| 
                     | 
                
                    
                     | 
            
- If $languageCode is defined, return if available, otherwise null
 - If not pick using the following languages codes when applicable:
- Prioritized languages (if provided to api on object retrieval)
 - Main language
 
 
On non translatable fields this method ignores the languageCode parameter, and return main language field.
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
| $fieldDefIdentifier | string | - | - | 
| $languageCode | string|null | null | - | 
Return values
Field|null
A Field or null if nothing is found
                
getFields()
            ¶
    
        This method returns the complete fields collection.
| 
                     | 
                
                    
                     | 
            
Return values
array<string|int, Field>
An array of Field
                
getFieldsByLanguage()
            ¶
    
        This method returns the fields for a given language and non translatable fields.
| 
                     | 
                
                    
                     | 
            
- If $languageCode is defined, return if available
 - If not pick using prioritized languages (if provided to api on object retrieval)
 - Otherwise return in main language
 
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
| $languageCode | string|null | null | - | 
Return values
iterable<string, Field>
An array of Field with field identifier as keys
                
getFieldValue()
            ¶
    
        Returns a field value for the given value.
| 
                     | 
                
                    
                     | 
            
- If $languageCode is defined, return if available, otherwise null
 - If not pick using the following languages codes when applicable:
- Prioritized languages (if provided to api on object retrieval)
 - Main language
 
 
On non translatable fields this method ignores the languageCode parameter, and return main language field value.
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
| $fieldDefIdentifier | string | - | - | 
| $languageCode | string|null | null | - | 
Return values
Value|null
a primitive type or a field type Value object depending on the field type.
                
getId()
            ¶
    
        | 
                     | 
                
                    
                     | 
            
Return values
int
                
getLogin()
            ¶
    
        | 
                     | 
                
                    
                     | 
            
Return values
string
                
getName()
            ¶
    
        Shorthand method for getVersionInfo()->getName().
| 
                     | 
                
                    
                     | 
            
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
| $languageCode | string|null | null | - | 
Return values
string|null
The name for a given language, or null if $languageCode is not set or does not exist.
                
getPasswordHash()
            ¶
    
        | 
                     | 
                
                    
                     | 
            
Return values
string
                
getThumbnail()
            ¶
    
        | 
                     | 
                
                    
                     | 
            
Return values
Thumbnail|null
                
getUserId()
            ¶
    
        The User id of the User this reference represent.
| 
                     | 
                
                    
                     | 
            
Return values
int
                
getVersionInfo()
            ¶
    
        Returns the VersionInfo for this version.
| 
                     | 
                
                    
                     | 
            
Return values
                
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]