Class BlockEditorVarianceHandler
Inheritance
Namespace: Umbraco.Cms.Core.PropertyEditors.ValueConverters
Assembly: Umbraco.Infrastructure.dll
Syntax
public sealed class BlockEditorVarianceHandler
Constructors
View SourceBlockEditorVarianceHandler(ILanguageService)
Declaration
public BlockEditorVarianceHandler(ILanguageService languageService)
Parameters
Type | Name | Description |
---|---|---|
ILanguage |
languageService |
BlockEditorVarianceHandler(ILanguageService, IContentTypeService)
Declaration
public BlockEditorVarianceHandler(ILanguageService languageService, IContentTypeService contentTypeService)
Parameters
Type | Name | Description |
---|---|---|
ILanguage |
languageService | |
IContent |
contentTypeService |
Methods
View SourceAlignedExposeVarianceAsync(BlockValue, IPublishedElement, IPublishedElement)
Aligns a block value for variance changes.
Declaration
public async Task<IEnumerable<BlockItemVariation>> AlignedExposeVarianceAsync(BlockValue blockValue, IPublishedElement owner, IPublishedElement element)
Parameters
Type | Name | Description |
---|---|---|
Block |
blockValue | The block property value to align. |
IPublished |
owner | The owner element (the content for block properties at content level, or the parent element for nested block properties). |
IPublished |
element | The containing block element. |
Returns
Type | Description |
---|---|
Task<IEnumerable<Block |
Remarks
Used for aligning variance changes when rendering content.
AlignedPropertyVarianceAsync(BlockPropertyValue, IPublishedPropertyType, IPublishedElement)
Aligns a block property value for variance changes.
Declaration
public async Task<BlockPropertyValue> AlignedPropertyVarianceAsync(BlockPropertyValue blockPropertyValue, IPublishedPropertyType propertyType, IPublishedElement owner)
Parameters
Type | Name | Description |
---|---|---|
Block |
blockPropertyValue | The block property value to align. |
IPublished |
propertyType | The underlying property type. |
IPublished |
owner | The containing block element. |
Returns
Type | Description |
---|---|
Task<Block |
Remarks
Used for aligning variance changes when rendering content.
AlignExposeVariance(BlockValue)
Aligns block value expose for variance changes.
Declaration
public void AlignExposeVariance(BlockValue blockValue)
Parameters
Type | Name | Description |
---|---|---|
Block |
blockValue | The block value to align. |
Remarks
Used for aligning variance changes when editing content.
This is expected to be invoked after all block values have been aligned for variance changes by Align
AlignPropertyVarianceAsync(BlockPropertyValue, IPropertyType, String)
Aligns a block property value for variance changes.
Declaration
public async Task AlignPropertyVarianceAsync(BlockPropertyValue blockPropertyValue, IPropertyType propertyType, string culture)
Parameters
Type | Name | Description |
---|---|---|
Block |
blockPropertyValue | The block property value to align. |
IProperty |
propertyType | The underlying property type. |
System. |
culture | The culture being handled (null if invariant). |
Returns
Type | Description |
---|---|
Task |
Remarks
Used for aligning variance changes when editing content.