Interface IConfigurationEditor
Represents an editor for editing the configuration of editors.
Namespace: Umbraco.Core.PropertyEditors
Assembly: Umbraco.Core.dll
Syntax
public interface IConfigurationEditor
Properties
View SourceDefaultConfiguration
Gets the default configuration.
Declaration
IDictionary<string, object> DefaultConfiguration { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.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
List<ConfigurationField> Fields { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<ConfigurationField> |
Methods
View SourceFromConfigurationEditor(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.Collections.Generic.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)
Converts the serialized database value into the actual configuration object.
Declaration
object FromDatabase(string configurationJson)
Parameters
Type | Name | Description |
---|---|---|
System.String | configurationJson |
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).
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 |
---|---|
System.Collections.Generic.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.Collections.Generic.IDictionary<System.String, System.Object> |