Class BlockListPropertyEditorBase
Abstract base class for block list based editors.
Namespace: Umbraco.Cms.Core.PropertyEditors
Assembly: Umbraco.Infrastructure.dll
Syntax
public abstract class BlockListPropertyEditorBase : DataEditor, IDataEditor, IDiscoverable, IValueSchemaProvider
Constructors
View SourceBlockListPropertyEditorBase(IDataValueEditorFactory, IBlockValuePropertyIndexValueFactory, IJsonSerializer)
Initializes a new instance of the BlockListPropertyEditorBase class.
Declaration
protected BlockListPropertyEditorBase(IDataValueEditorFactory dataValueEditorFactory, IBlockValuePropertyIndexValueFactory blockValuePropertyIndexValueFactory, IJsonSerializer jsonSerializer)
Parameters
| Type | Name | Description |
|---|---|---|
| IDataValueEditorFactory | dataValueEditorFactory | |
| IBlockValuePropertyIndexValueFactory | blockValuePropertyIndexValueFactory | |
| IJsonSerializer | jsonSerializer |
Properties
View SourcePropertyIndexValueFactory
Gets the index value factory for the editor.
Declaration
public override IPropertyIndexValueFactory PropertyIndexValueFactory { get; }
Property Value
| Type | Description |
|---|---|
| IPropertyIndexValueFactory |
Methods
View SourceCreateBlockEditorDataConverter()
Instantiates a new BlockEditorDataConverter<TValue, TLayout> for use with the block list editor property value editor.
Declaration
protected virtual BlockEditorDataConverter<BlockListValue, BlockListLayoutItem> CreateBlockEditorDataConverter()
Returns
| Type | Description |
|---|---|
| BlockEditorDataConverter<BlockListValue, BlockListLayoutItem> | A new instance of BlockListEditorDataConverter. |
CreateValueEditor()
Creates a value editor instance.
Declaration
protected override IDataValueEditor CreateValueEditor()
Returns
| Type | Description |
|---|---|
| IDataValueEditor |
GetValueSchema(object?)
Gets a JSON Schema (draft 2020-12) describing the incoming value structure.
Declaration
public virtual JsonObject? GetValueSchema(object? configuration)
Parameters
| Type | Name | Description |
|---|---|---|
| object | configuration | The data type configuration, which may affect the schema. |
Returns
| Type | Description |
|---|---|
| JsonObject | A System.Text.Json.Nodes.JsonObject containing a valid JSON Schema, or |
Remarks
The returned schema should describe the structure that IDataValueEditor.FromEditor receives (i.e., what the Management API accepts).
For configuration-dependent schemas (e.g., BlockList with specific element types), the schema should reflect the constraints defined in the configuration.
GetValueType(object?)
Gets the CLR type that represents the incoming value structure.
Declaration
public virtual Type? GetValueType(object? configuration)
Parameters
| Type | Name | Description |
|---|---|---|
| object | configuration | The data type configuration, which may affect the value type. |
Returns
| Type | Description |
|---|---|
| Type | The CLR type of the incoming value, or |
Remarks
For simple editors (e.g., textbox), this might return string.
For complex editors (e.g., MediaPicker3), this returns the DTO type that the editor submits.
For block-based editors where the structure is entirely configuration-dependent, this may return null.