Class ComplexPropertyEditorContentNotificationHandler
Handles nested Udi keys when
- saving: Empty keys get generated
- copy: keys get replaced by new ones while keeping references intact
- scaffolding: keys get replaced by new ones while keeping references intact
Inheritance
Namespace: Umbraco.Cms.Core.PropertyEditors
Assembly: Umbraco.Infrastructure.dll
Syntax
public abstract class ComplexPropertyEditorContentNotificationHandler : INotificationHandler<ContentSavingNotification>, INotificationHandler<ContentCopyingNotification>, INotificationHandler<ContentScaffoldedNotification>, INotificationHandler
Constructors
View SourceComplexPropertyEditorContentNotificationHandler()
Declaration
protected ComplexPropertyEditorContentNotificationHandler()
Properties
View SourceEditorAlias
Declaration
protected abstract string EditorAlias { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
View SourceFormatPropertyValue(string, bool)
Declaration
protected abstract string FormatPropertyValue(string rawJson, bool onlyMissingKeys)
Parameters
| Type | Name | Description |
|---|---|---|
| string | rawJson | |
| bool | onlyMissingKeys |
Returns
| Type | Description |
|---|---|
| string |
Handle(ContentCopyingNotification)
Handles a ContentCopyingNotification by updating property values for all properties that use the configured editor alias on the copied content.
Declaration
public void Handle(ContentCopyingNotification notification)
Parameters
| Type | Name | Description |
|---|---|---|
| ContentCopyingNotification | notification | The notification containing information about the content being copied. |
Handle(ContentSavingNotification)
Handles a ContentSavingNotification by updating property values for all properties that use the configured editor alias on the content being saved.
Declaration
public void Handle(ContentSavingNotification notification)
Parameters
| Type | Name | Description |
|---|---|---|
| ContentSavingNotification | notification | The notification containing information about the content being saved. |
Remarks
This ensures that property values are updated appropriately before the content is persisted.
Handle(ContentScaffoldedNotification)
Handles a ContentScaffoldedNotification by updating property values for properties that use the complex property editor.
Declaration
public void Handle(ContentScaffoldedNotification notification)
Parameters
| Type | Name | Description |
|---|---|---|
| ContentScaffoldedNotification | notification | The ContentScaffoldedNotification containing event data for the content scaffolded operation. |