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. |
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 To
DefaultConfigurationObject
Gets the default configuration object.
Declaration
object DefaultConfigurationObject { get; }
Property Value
Type | Description |
---|---|
System. |
Remarks
For basic configuration editors, this will be DefaultTConfiguration
.
Fields
Gets the fields.
Declaration
[DataMember(Name = "fields")]
List<ConfigurationField> Fields { get; }
Property Value
Type | Description |
---|---|
List<Configuration |
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. |
editorValues | The values posted by the configuration editor. |
System. |
configuration | The current configuration object. |
Returns
Type | Description |
---|---|
System. |
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. |
configurationJson | |
IConfiguration |
configurationEditorJsonSerializer |
Returns
Type | Description |
---|---|
System. |
Remarks
Converting the configuration object to the serialized database value is
achieved by simply serializing the configuration. See To
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. |
obj |
Returns
Type | Description |
---|---|
System. |
ToConfigurationEditor(Object)
Converts the configuration object to values for the configuration editor.
Declaration
IDictionary<string, object> ToConfigurationEditor(object configuration)
Parameters
Type | Name | Description |
---|---|---|
System. |
configuration | The configuration. |
Returns
Type | Description |
---|---|
IDictionary<System. |
ToConfigurationEditorNullable(Object)
Declaration
virtual IDictionary<string, object> ToConfigurationEditorNullable(object configuration)
Parameters
Type | Name | Description |
---|---|---|
System. |
configuration |
Returns
Type | Description |
---|---|
IDictionary<System. |
ToValueEditor(Object)
Converts the configuration object to values for the value editor.
Declaration
IDictionary<string, object>? ToValueEditor(object configuration)
Parameters
Type | Name | Description |
---|---|---|
System. |
configuration | The configuration. |
Returns
Type | Description |
---|---|
System. |