Search Results for

    Show / Hide Table of Contents
    View Source

    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 Source

    DefaultConfiguration

    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).

    View Source

    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.

    View Source

    Fields

    Gets the fields.

    Declaration
    [DataMember(Name = "fields")]
    List<ConfigurationField> Fields { get; }
    Property Value
    Type Description
    List<ConfigurationField>

    Methods

    View Source

    FromConfigurationEditor(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
    View Source

    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).

    View Source

    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
    View Source

    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>
    View Source

    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>
    View Source

    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>>
    • Improve this Doc
    • View Source
    In This Article
    • Properties
      • DefaultConfiguration
      • DefaultConfigurationObject
      • Fields
    • Methods
      • FromConfigurationEditor(Nullable<IDictionary<String, Object>>, Object)
      • FromDatabase(String, IConfigurationEditorJsonSerializer)
      • IsConfiguration(Object)
      • ToConfigurationEditor(Object)
      • ToConfigurationEditorNullable(Object)
      • ToValueEditor(Object)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX