this class represents a content object in a specific version.
Constants¶
                 DEFAULT_PASSWORD_HASH        ¶
DEFAULT_PASSWORD_HASH        ¶
    
        |  |  | 
Default password hash, used when none is specified, may change over time
                 PASSWORD_HASH_BCRYPT        ¶
PASSWORD_HASH_BCRYPT        ¶
    
        |  |  | 
Passwords in bcrypt
                 PASSWORD_HASH_PHP_DEFAULT        ¶
PASSWORD_HASH_PHP_DEFAULT        ¶
    
        |  |  | 
Passwords hashed by PHPs default algorithm, which may change over time
                 SUPPORTED_PASSWORD_HASHES        ¶
SUPPORTED_PASSWORD_HASHES        ¶
    
        |  |  | 
List of supported (by default) hash types.
Properties¶
                 $contentInfo
            ¶
        $contentInfo
            ¶
    
        |  |  | 
@deprecated 4.6.7 accessing magic getter is deprecated and will be removed in 5.0.0. Use Content::getContentInfo() instead.
                 $fields
            ¶
        $fields
            ¶
    
        |  |  | 
access fields, calls getFields()
                 $id
            ¶
        $id
            ¶
    
        |  |  | 
@deprecated 4.6.7 accessing magic getter is deprecated and will be removed in 5.0.0. Use Content::getId() instead.
                 $thumbnail
            ¶
        $thumbnail
            ¶
    
        |  |  | 
calls getThumbnail()
                 $versionInfo
            ¶
        $versionInfo
            ¶
    
        |  |  | 
calls getVersionInfo()
                 $email
            ¶
        $email
            ¶
    
        User E-Mail address.
|  |  | 
                 $enabled
            ¶
        $enabled
            ¶
    
        Flag to signal if user is enabled or not.
|  |  | 
User can not login if false
                 $hashAlgorithm
            ¶
        $hashAlgorithm
            ¶
    
        Hash algorithm used to hash the password.
|  |  | 
                 $login
            ¶
        $login
            ¶
    
        User login.
|  |  | 
                 $maxLogin
            ¶
        $maxLogin
            ¶
    
        Max number of time user is allowed to login.
|  |  | 
Tags
                 $passwordHash
            ¶
        $passwordHash
            ¶
    
        User password hash.
|  |  | 
                 $passwordUpdatedAt
            ¶
        $passwordUpdatedAt
            ¶
    
        Datetime of last password update.
|  |  | 
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()
            ¶
    
        |  |  | 
Return values
                 getContentType()
            ¶
getContentType()
            ¶
    
        Returns the ContentType for this content.
|  |  | 
Return values
                 getDefaultLanguageCode()
            ¶
getDefaultLanguageCode()
            ¶
    
        |  |  | 
Return values
string
                 getField()
            ¶
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()
            ¶
getFields()
            ¶
    
        This method returns the complete fields collection.
|  |  | 
Return values
array<string|int, Field>
An array of Field
                 getFieldsByLanguage()
            ¶
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
array<string|int, Field>
An array of Field with field identifier as keys
                 getFieldValue()
            ¶
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()
            ¶
getId()
            ¶
    
        |  |  | 
Return values
int
                 getLogin()
            ¶
getLogin()
            ¶
    
        |  |  | 
Return values
string
                 getName()
            ¶
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()
            ¶
getPasswordHash()
            ¶
    
        |  |  | 
Return values
string
                 getThumbnail()
            ¶
getThumbnail()
            ¶
    
        |  |  | 
Return values
Thumbnail|null
                 getUserId()
            ¶
getUserId()
            ¶
    
        The User id of the User this reference represent.
|  |  | 
Return values
int
                 getVersionInfo()
            ¶
getVersionInfo()
            ¶
    
        Returns the VersionInfo for this version.
|  |  | 
Return values
                 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>