Interface IConfigurationEditor
Represents an editor for editing the configuration of editors.
Namespace: Umbraco.Cms.Core.PropertyEditors
Assembly: Umbraco.Core.dll
Syntax
public interface IConfigurationEditorProperties
View SourceDefaultConfiguration
Gets the default configuration.
Declaration
[DataMember(Name = "defaultConfig")]
IDictionary<string, object> DefaultConfiguration { get; }Property Value
| Type | Description | 
|---|---|
| IDictionary<System.String, System.Object> | 
Remarks
    For basic configuration editors, this will be a dictionary of key/values. For advanced editors
    which inherit from ConfigurationEditor<TConfiguration>, this will be the dictionary
    equivalent of an actual configuration object (ie an instance of TConfiguration, obtained
    via ToConfigurationEditor(Object).
DefaultConfigurationObject
Gets the default configuration object.
Declaration
object DefaultConfigurationObject { get; }Property Value
| Type | Description | 
|---|---|
| System.Object | 
Remarks
    For basic configuration editors, this will be DefaultConfiguration, ie a
    dictionary of key/values. For advanced editors which inherit from
ConfigurationEditor<TConfiguration>,
this will be an actual configuration object (ie an instance of TConfiguration.
Fields
Gets the fields.
Declaration
[DataMember(Name = "fields")]
List<ConfigurationField> Fields { get; }Property Value
| Type | Description | 
|---|---|
| List<ConfigurationField> | 
Methods
View SourceFromConfigurationEditor(Nullable<IDictionary<String, Object>>, Object)
Converts the values posted by the configuration editor into the actual configuration object.
Declaration
object FromConfigurationEditor(IDictionary<string, object>? editorValues, object configuration)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Nullable<IDictionary<System.String, System.Object>> | editorValues | The values posted by the configuration editor. | 
| System.Object | configuration | The current configuration object. | 
Returns
| Type | Description | 
|---|---|
| System.Object | 
FromDatabase(String, IConfigurationEditorJsonSerializer)
Converts the serialized database value into the actual configuration object.
Declaration
object FromDatabase(string configurationJson, IConfigurationEditorJsonSerializer configurationEditorJsonSerializer)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | configurationJson | |
| IConfigurationEditorJsonSerializer | configurationEditorJsonSerializer | 
Returns
| Type | Description | 
|---|---|
| System.Object | 
Remarks
Converting the configuration object to the serialized database value is achieved by simply serializing the configuration. See ToDatabase(Object, IConfigurationEditorJsonSerializer).
IsConfiguration(Object)
Determines whether a configuration object is of the type expected by the configuration editor.
Declaration
bool IsConfiguration(object obj)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Object | obj | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | 
ToConfigurationEditor(Object)
Converts the configuration object to values for the configuration editor.
Declaration
IDictionary<string, object> ToConfigurationEditor(object configuration)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Object | configuration | The configuration. | 
Returns
| Type | Description | 
|---|---|
| IDictionary<System.String, System.Object> | 
ToConfigurationEditorNullable(Object)
Declaration
virtual IDictionary<string, object> ToConfigurationEditorNullable(object configuration)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Object | configuration | 
Returns
| Type | Description | 
|---|---|
| IDictionary<System.String, System.Object> | 
ToValueEditor(Object)
Converts the configuration object to values for the value editor.
Declaration
IDictionary<string, object>? ToValueEditor(object configuration)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Object | configuration | The configuration. | 
Returns
| Type | Description | 
|---|---|
| System.Nullable<IDictionary<System.String, System.Object>> |