this class represents a content object in a specific version.
Constants¶
DEFAULT_PASSWORD_HASH ¶
|
|
Default password hash, used when none is specified, may change over time
PASSWORD_HASH_BCRYPT ¶
|
|
Passwords in bcrypt
PASSWORD_HASH_PHP_DEFAULT ¶
|
|
Passwords hashed by PHPs default algorithm, which may change over time
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.
$email¶
|
|
$enabled¶
|
|
User can not login if false
$fields¶
|
|
access fields, calls getFields()
$hashAlgorithm¶
|
|
Hash algorithm used to hash the password
$id¶
|
|
@deprecated 4.6.7 accessing magic getter is deprecated and will be removed in 5.0.0. Use Content::getId() instead.
$login¶
|
|
@deprecated 4.6.7 accessing magic getter is deprecated and will be removed in 5.0.0. Use User::getLogin() instead.
$maxLogin¶
|
|
Max number of time user is allowed to login
$passwordHash¶
|
|
@deprecated 4.6.7 accessing magic getter is deprecated and will be removed in 5.0.0. Use User::getPasswordHash() instead.
$passwordUpdatedAt¶
|
|
$thumbnail¶
|
|
calls getThumbnail()
$versionInfo¶
|
|
calls getVersionInfo()
$email¶
User E-Mail address.
|
|
$enabled¶
Flag to signal if user is enabled or not.
|
|
User can not login if false
$hashAlgorithm¶
Hash algorithm used to hash the password.
|
|
$login¶
User login.
|
|
$maxLogin¶
Max number of time user is allowed to login.
|
|
Tags
$passwordHash¶
User password hash.
|
|
$passwordUpdatedAt¶
Datetime of last password update.
|
|
Methods¶
__construct() ¶
Construct object optionally with a set of properties.
|
|
Readonly properties values must be set using $properties as they are not writable anymore after object has been created.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$properties | array<string|int, 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
array<string|int, 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() ¶
Function where list of properties are returned.
|
|
Used by attributes(), override to add dynamic properties
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$dynamicProperties | array<string|int, mixed> | [] |
Additional dynamic properties exposed on the object |
Return values
array<string|int, mixed>