Search Results for

    Show / Hide Table of Contents
    View Source

    Class BlockGridPropertyEditor

    Represents a block list property editor.

    Inheritance
    object
    DataEditor
    BlockGridPropertyEditorBase
    Namespace: Umbraco.Cms.Core.PropertyEditors
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    [DataEditor("Umbraco.BlockGrid", ValueType = "JSON")]
    public class BlockGridPropertyEditor : BlockGridPropertyEditorBase, IDataEditor, IDiscoverable, IValueSchemaProvider

    Constructors

    View Source

    BlockGridPropertyEditor(IDataValueEditorFactory, IIOHelper, IBlockValuePropertyIndexValueFactory)

    Initializes a new instance of the BlockGridPropertyEditor class.

    Declaration
    public BlockGridPropertyEditor(IDataValueEditorFactory dataValueEditorFactory, IIOHelper ioHelper, IBlockValuePropertyIndexValueFactory blockValuePropertyIndexValueFactory)
    Parameters
    Type Name Description
    IDataValueEditorFactory dataValueEditorFactory

    Factory used to create data value editors for property editing.

    IIOHelper ioHelper

    Helper for IO operations, such as file and path handling.

    IBlockValuePropertyIndexValueFactory blockValuePropertyIndexValueFactory

    Factory for creating index values for block value properties.

    Properties

    View Source

    SupportsConfigurableElements

    Gets a value indicating whether the BlockGridPropertyEditor supports configurable elements. This property always returns true.

    Declaration
    public override bool SupportsConfigurableElements { get; }
    Property Value
    Type Description
    bool

    Methods

    View Source

    CanMergePartialPropertyValues(IPropertyType)

    Determines if the value editor needs to perform MergePartialPropertyValueForCulture(object?, object?, string?) for a given property type.

    Declaration
    public override bool CanMergePartialPropertyValues(IPropertyType propertyType)
    Parameters
    Type Name Description
    IPropertyType propertyType
    Returns
    Type Description
    bool
    View Source

    CreateConfigurationEditor()

    Creates a configuration editor instance.

    Declaration
    protected override IConfigurationEditor CreateConfigurationEditor()
    Returns
    Type Description
    IConfigurationEditor
    View Source

    MergePartialPropertyValueForCulture(object?, object?, string?)

    Partially merges a source property value into a target property value for a given culture.

    Declaration
    public override object? MergePartialPropertyValueForCulture(object? sourceValue, object? targetValue, string? culture)
    Parameters
    Type Name Description
    object sourceValue

    The source property value.

    object targetValue

    The target property value.

    string culture

    The culture (or null for invariant).

    Returns
    Type Description
    object

    The result of the merge operation.

    View Source

    MergeVariantInvariantPropertyValue(object?, object?, bool, HashSet<string>)

    Merges variant (culture-specific) and invariant (culture-neutral) property values for the Block Grid editor.

    Declaration
    public override object? MergeVariantInvariantPropertyValue(object? sourceValue, object? targetValue, bool canUpdateInvariantData, HashSet<string> allowedCultures)
    Parameters
    Type Name Description
    object sourceValue

    The source property value to merge from, typically representing the incoming or updated value.

    object targetValue

    The target property value to merge into, typically representing the existing or persisted value.

    bool canUpdateInvariantData

    True if invariant (culture-neutral) data is allowed to be updated during the merge; otherwise, false.

    HashSet<string> allowedCultures

    A set of culture codes that are permitted for merging variant values.

    Returns
    Type Description
    object

    The resulting merged property value, or null if the merge produces no value.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX