Interface IPublishedPropertyType
Represents a published property type.
Namespace: Umbraco.Cms.Core.Models.PublishedContent
Assembly: Umbraco.Core.dll
Syntax
public interface IPublishedPropertyTypeRemarks
Instances implementing the PublishedPropertyType interface should be immutable, ie if the property type changes, then a new instance needs to be created.
Properties
View SourceAlias
Gets property type alias.
Declaration
string Alias { get; }Property Value
| Type | Description | 
|---|---|
| System.String | 
CacheLevel
Gets the property cache level.
Declaration
PropertyCacheLevel CacheLevel { get; }Property Value
| Type | Description | 
|---|---|
| PropertyCacheLevel | 
ClrType
Gets the property CLR type.
Declaration
Type? ClrType { get; }Property Value
| Type | Description | 
|---|---|
| System.Nullable<Type> | 
Remarks
Returns the actual CLR type which does not contain ModelType types.
Mapping from ModelClrType may throw if some ModelType instances could not be mapped to actual CLR types.
ContentType
Gets the published content type containing the property type.
Declaration
IPublishedContentType ContentType { get; }Property Value
| Type | Description | 
|---|---|
| IPublishedContentType | 
DataType
Gets the data type.
Declaration
PublishedDataType DataType { get; }Property Value
| Type | Description | 
|---|---|
| PublishedDataType | 
DeliveryApiCacheLevel
Gets the property cache level for Delivery API representation.
Declaration
PropertyCacheLevel DeliveryApiCacheLevel { get; }Property Value
| Type | Description | 
|---|---|
| PropertyCacheLevel | 
DeliveryApiCacheLevelForExpansion
Gets the property cache level for Delivery API representation when expanding the property.
Declaration
virtual PropertyCacheLevel DeliveryApiCacheLevelForExpansion { get; }Property Value
| Type | Description | 
|---|---|
| PropertyCacheLevel | 
Remarks
Defaults to the value of DeliveryApiCacheLevel.
DeliveryApiModelClrType
Gets the property model Delivery Api CLR type.
Declaration
virtual Type DeliveryApiModelClrType { get; }Property Value
| Type | Description | 
|---|---|
| Type | 
Remarks
View SourceEditorAlias
Gets the property editor alias.
Declaration
string EditorAlias { get; }Property Value
| Type | Description | 
|---|---|
| System.String | 
EditorUiAlias
Gets the property editor UI alias.
Declaration
string EditorUiAlias { get; }Property Value
| Type | Description | 
|---|---|
| System.String | 
IsUserProperty
Gets a value indicating whether the property is a user content property.
Declaration
bool IsUserProperty { get; }Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
Remarks
A non-user content property is a property that has been added to a published content type by Umbraco but does not corresponds to a user-defined published property.
ModelClrType
Gets the property model CLR type.
Declaration
Type ModelClrType { get; }Property Value
| Type | Description | 
|---|---|
| Type | 
Remarks
The model CLR type may be a ModelType type, or may contain ModelType types.
For the actual CLR type, see ClrType.
Variations
Gets the content variations of the property type.
Declaration
ContentVariation Variations { get; }Property Value
| Type | Description | 
|---|---|
| ContentVariation | 
Methods
View SourceConvertInterToDeliveryApiObject(IPublishedElement, PropertyCacheLevel, Object, Boolean, Boolean)
Converts the intermediate value into the object value for Delivery API representation.
Declaration
object ConvertInterToDeliveryApiObject(IPublishedElement owner, PropertyCacheLevel referenceCacheLevel, object inter, bool preview, bool expanding)Parameters
| Type | Name | Description | 
|---|---|---|
| IPublishedElement | owner | The published element owning the property. | 
| PropertyCacheLevel | referenceCacheLevel | The reference cache level. | 
| System.Object | inter | The intermediate value. | 
| System.Boolean | preview | A value indicating whether content should be considered draft. | 
| System.Boolean | expanding | A value indicating whether the property value should be expanded. | 
Returns
| Type | Description | 
|---|---|
| System.Object | The object value. | 
ConvertInterToObject(IPublishedElement, PropertyCacheLevel, Object, Boolean)
Converts the intermediate value into the object value.
Declaration
object ConvertInterToObject(IPublishedElement owner, PropertyCacheLevel referenceCacheLevel, object inter, bool preview)Parameters
| Type | Name | Description | 
|---|---|---|
| IPublishedElement | owner | The published element owning the property. | 
| PropertyCacheLevel | referenceCacheLevel | The reference cache level. | 
| System.Object | inter | The intermediate value. | 
| System.Boolean | preview | A value indicating whether content should be considered draft. | 
Returns
| Type | Description | 
|---|---|
| System.Object | The object value. | 
ConvertSourceToInter(IPublishedElement, Object, Boolean)
Converts the source value into the intermediate value.
Declaration
object ConvertSourceToInter(IPublishedElement owner, object source, bool preview)Parameters
| Type | Name | Description | 
|---|---|---|
| IPublishedElement | owner | The published element owning the property. | 
| System.Object | source | The source value. | 
| System.Boolean | preview | A value indicating whether content should be considered draft. | 
Returns
| Type | Description | 
|---|---|
| System.Object | The intermediate value. | 
IsValue(Object, PropertyValueLevel)
Determines whether a value is an actual value, or not a value.
Declaration
bool? IsValue(object value, PropertyValueLevel level)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Object | value | |
| PropertyValueLevel | level | 
Returns
| Type | Description | 
|---|---|
| System.Nullable<System.Boolean> | 
Remarks
Used by property.HasValue and, for instance, in fallback scenarios.