Interface IConfigurationEditor
Represents an editor for editing the configuration of editors.
Namespace: Umbraco.Cms.Core.PropertyEditors
Assembly: Umbraco.Core.dll
Syntax
public interface IConfigurationEditor
Properties
View SourceDefaultConfiguration
Gets the default configuration.
Declaration
[DataMember(Name = "defaultConfig")]
IDictionary<string, object> DefaultConfiguration { get; }
Property Value
Type | Description |
---|---|
IDictionary<System.String, System.Object> |
Fields
Gets the fields.
Declaration
[DataMember(Name = "fields")]
List<ConfigurationField> Fields { get; }
Property Value
Type | Description |
---|---|
List<ConfigurationField> |
Methods
View SourceFromConfigurationEditor(IDictionary<String, Object>)
Converts values from the configuration editor to configuration data.
Declaration
IDictionary<string, object> FromConfigurationEditor(IDictionary<string, object> configuration)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<System.String, System.Object> | configuration | Values from the configuration editor. |
Returns
Type | Description |
---|---|
IDictionary<System.String, System.Object> |
Remarks
Consider this the reverse of ToConfigurationEditor(IDictionary<String, Object>).
FromConfigurationObject(Object, IConfigurationEditorJsonSerializer)
Creates configuration data from a configuration object.
Declaration
IDictionary<string, object> FromConfigurationObject(object configuration, IConfigurationEditorJsonSerializer configurationEditorJsonSerializer)
Parameters
Type | Name | Description |
---|---|---|
System.Object | configuration | The configuration object. |
IConfigurationEditorJsonSerializer | configurationEditorJsonSerializer | The configuration serializer. |
Returns
Type | Description |
---|---|
IDictionary<System.String, System.Object> |
FromDatabase(String, IConfigurationEditorJsonSerializer)
Converts a serialized database value into configuration data.
Declaration
IDictionary<string, object> FromDatabase(string configuration, IConfigurationEditorJsonSerializer configurationEditorJsonSerializer)
Parameters
Type | Name | Description |
---|---|---|
System.String | configuration | The serialized database value (JSON format). |
IConfigurationEditorJsonSerializer | configurationEditorJsonSerializer | The configuration serializer. |
Returns
Type | Description |
---|---|
IDictionary<System.String, System.Object> |
ToConfigurationEditor(IDictionary<String, Object>)
Converts the configuration data to values for the configuration editor.
Declaration
IDictionary<string, object> ToConfigurationEditor(IDictionary<string, object> configuration)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<System.String, System.Object> | configuration | The configuration data. |
Returns
Type | Description |
---|---|
IDictionary<System.String, System.Object> |
ToConfigurationObject(IDictionary<String, Object>, IConfigurationEditorJsonSerializer)
Creates a configuration object from the configuration data.
Declaration
object ToConfigurationObject(IDictionary<string, object> configuration, IConfigurationEditorJsonSerializer configurationEditorJsonSerializer)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<System.String, System.Object> | configuration | The configuration data. |
IConfigurationEditorJsonSerializer | configurationEditorJsonSerializer | The configuration serializer. |
Returns
Type | Description |
---|---|
System.Object |
ToDatabase(IDictionary<String, Object>, IConfigurationEditorJsonSerializer)
Converts configuration data into a serialized database value.
Declaration
string ToDatabase(IDictionary<string, object> configuration, IConfigurationEditorJsonSerializer configurationEditorJsonSerializer)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<System.String, System.Object> | configuration | |
IConfigurationEditorJsonSerializer | configurationEditorJsonSerializer |
Returns
Type | Description |
---|---|
System.String |
ToValueEditor(IDictionary<String, Object>)
Converts the configuration data to values for the value editor.
Declaration
IDictionary<string, object> ToValueEditor(IDictionary<string, object> configuration)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<System.String, System.Object> | configuration | The configuration data. |
Returns
Type | Description |
---|---|
IDictionary<System.String, System.Object> |
Validate(IDictionary<String, Object>)
Performs validation of configuration data.
Declaration
IEnumerable<ValidationResult> Validate(IDictionary<string, object> configuration)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<System.String, System.Object> | configuration | The configuration data to validate. |
Returns
Type | Description |
---|---|
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> | One or more System.ComponentModel.DataAnnotations.ValidationResult if the configuration data is invalid, an empty collection otherwise. |