Represents a value editor.
InheritanceSystem.Object
Namespace: Umbraco.Cms.Core.PropertyEditors Assembly: Umbraco.Core.dll Syntax[DataContract]
public class DataValueEditor : IDataValueEditor
Constructors View Source DataValueEditor(ILocalizedTextService, IShortStringHelper, IJsonSerializer) Declaration
public DataValueEditor(ILocalizedTextService localizedTextService, IShortStringHelper shortStringHelper, IJsonSerializer jsonSerializer)
Parameters View Source DataValueEditor(ILocalizedTextService, IShortStringHelper, IJsonSerializer, IIOHelper, DataEditorAttribute) Declaration
public DataValueEditor(ILocalizedTextService localizedTextService, IShortStringHelper shortStringHelper, IJsonSerializer jsonSerializer, IIOHelper ioHelper, DataEditorAttribute attribute)
Parameters View Source DataValueEditor(IShortStringHelper, IJsonSerializer)
Initializes a new instance of the DataValueEditor class.
Declarationpublic DataValueEditor(IShortStringHelper shortStringHelper, IJsonSerializer jsonSerializer)
Parameters View Source DataValueEditor(IShortStringHelper, IJsonSerializer, IIOHelper, DataEditorAttribute)
Initializes a new instance of the DataValueEditor class.
Declarationpublic DataValueEditor(IShortStringHelper shortStringHelper, IJsonSerializer jsonSerializer, IIOHelper ioHelper, DataEditorAttribute attribute)
Parameters Properties View Source ConfigurationObject
Gets or sets the value editor configuration.
Declarationpublic virtual object ConfigurationObject { get; set; }
Property Value Type Description System.Object View Source FormatValidator
Gets the validator used to validate the special property type -level "format".
Declarationpublic virtual IValueFormatValidator FormatValidator { get; }
Property Value View Source IsReadOnly
Set this to true if the property editor is for display purposes only
Declarationpublic virtual bool IsReadOnly { get; }
Property Value Type Description System.Boolean View Source RequiredValidator
Gets the validator used to validate the special property type -level "required".
Declarationpublic virtual IValueRequiredValidator RequiredValidator { get; }
Property Value View Source SupportsReadOnly Declaration
public bool SupportsReadOnly { get; set; }
Property Value Type Description System.Boolean View Source Validators
A collection of validators for the pre value editor
Declaration[DataMember(Name = "validation")]
public List<IValueValidator> Validators { get; }
Property Value View Source ValueType
The value type which reflects how it is validated and stored in the database
Declaration[DataMember(Name = "valueType")]
public string ValueType { get; set; }
Property Value Type Description System.String Methods View Source ConfiguredElementTypeKeys() Declaration
public virtual IEnumerable<Guid> ConfiguredElementTypeKeys()
Returns Type Description IEnumerable<Guid> View Source ConvertDbToString(IPropertyType, Object)
Converts a property value to a string.
Declarationpublic virtual string ConvertDbToString(IPropertyType propertyType, object value)
Parameters Type Name Description IPropertyType propertyType System.Object value Returns Type Description System.String View Source ConvertDbToXml(IProperty, Boolean)
Converts a property to Xml fragments.
Declarationpublic IEnumerable<XElement> ConvertDbToXml(IProperty property, bool published)
Parameters Type Name Description IProperty property System.Boolean published Returns Type Description IEnumerable<System.Xml.Linq.XElement> View Source ConvertDbToXml(IPropertyType, Object)
Converts a property value to an Xml fragment.
Declarationpublic XNode ConvertDbToXml(IPropertyType propertyType, object value)
Parameters Type Name Description IPropertyType propertyType System.Object value Returns Type Description System.Xml.Linq.XNode View Source FromEditor(ContentPropertyData, Object)
A method to deserialize the string value that has been saved in the content editor to an object to be stored in the database.
Declarationpublic virtual object FromEditor(ContentPropertyData editorValue, object currentValue)
Parameters Type Name Description ContentPropertyData editorValue
The value returned by the editor.
System.Object currentValueThe current value that has been persisted to the database for this editor. This value may be useful for how the value then get's deserialized again to be re-persisted. In most cases it will probably not be used.
Returns Type Description System.ObjectThe value that gets persisted to the database.
View Source ToEditor(IProperty, String, String)A method used to format the database value to a value that can be used by the editor.
Declarationpublic virtual object ToEditor(IProperty property, string culture = null, string segment = null)
Parameters Type Name Description IProperty property
The property.
System.String cultureThe culture.
System.String segmentThe segment.
Returns Type Description System.Object Exceptions Type Condition System.ArgumentOutOfRangeExceptionValueType was out of range.
View Source Validate(Object, Boolean, String, PropertyValidationContext)Validates a property value.
Declarationpublic IEnumerable<ValidationResult> Validate(object value, bool required, string format, PropertyValidationContext validationContext)
Parameters Type Name Description System.Object value
The property value.
System.Boolean requiredA value indicating whether the property value is required.
System.String formatA specific format (regex) that the property value must respect.
PropertyValidationContext validationContextThe context in which the property value is being validated.
Returns Type Description IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult>RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4