Class ImageCropperPropertyEditor
Represents an image cropper property editor.
Namespace: Umbraco.Cms.Core.PropertyEditors
Assembly: Umbraco.Infrastructure.dll
Syntax
[DataEditor("Umbraco.ImageCropper", ValueType = "JSON", ValueEditorIsReusable = true)]
public class ImageCropperPropertyEditor : DataEditor, IDataEditor, IDiscoverable, IMediaUrlGenerator, INotificationHandler<ContentCopiedNotification>, INotificationHandler<ContentDeletedNotification>, INotificationHandler<MediaDeletedNotification>, INotificationHandler<MediaSavingNotification>, INotificationHandler<MediaMovedToRecycleBinNotification>, INotificationHandler<MediaMovedNotification>, INotificationHandler<MemberDeletedNotification>, INotificationHandler
Constructors
View SourceImageCropperPropertyEditor(IDataValueEditorFactory, ILoggerFactory, MediaFileManager, IOptionsMonitor<ContentSettings>, IIOHelper, UploadAutoFillProperties, IContentService, IJsonSerializer)
Initializes a new instance of the ImageCropperPropertyEditor class.
Declaration
public ImageCropperPropertyEditor(IDataValueEditorFactory dataValueEditorFactory, ILoggerFactory loggerFactory, MediaFileManager mediaFileManager, IOptionsMonitor<ContentSettings> contentSettings, IIOHelper ioHelper, UploadAutoFillProperties uploadAutoFillProperties, IContentService contentService, IJsonSerializer jsonSerializer)
Parameters
| Type | Name | Description |
|---|---|---|
| IDataValueEditorFactory | dataValueEditorFactory | |
| ILoggerFactory | loggerFactory | |
| MediaFileManager | mediaFileManager | |
| IOptionsMonitor<ContentSettings> | contentSettings | |
| IIOHelper | ioHelper | |
| UploadAutoFillProperties | uploadAutoFillProperties | |
| IContentService | contentService | |
| 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 SourceCreateConfigurationEditor()
Creates the corresponding preValue editor.
Declaration
protected override IConfigurationEditor CreateConfigurationEditor()
Returns
| Type | Description |
|---|---|
| IConfigurationEditor | The corresponding preValue editor. |
CreateValueEditor()
Creates the corresponding property value editor.
Declaration
protected override IDataValueEditor CreateValueEditor()
Returns
| Type | Description |
|---|---|
| IDataValueEditor | The corresponding property value editor. |
Handle(ContentCopiedNotification)
After a content has been copied, also copy uploaded files.
Declaration
public void Handle(ContentCopiedNotification notification)
Parameters
| Type | Name | Description |
|---|---|---|
| ContentCopiedNotification | notification |
Handle(ContentDeletedNotification)
Handles a notification.
Declaration
public void Handle(ContentDeletedNotification notification)
Parameters
| Type | Name | Description |
|---|---|---|
| ContentDeletedNotification | notification | The notification. |
Handle(MediaDeletedNotification)
Handles a notification.
Declaration
public void Handle(MediaDeletedNotification notification)
Parameters
| Type | Name | Description |
|---|---|---|
| MediaDeletedNotification | notification | The notification. |
Handle(MediaMovedNotification)
Handles a notification.
Declaration
public void Handle(MediaMovedNotification notification)
Parameters
| Type | Name | Description |
|---|---|---|
| MediaMovedNotification | notification | The notification. |
Handle(MediaMovedToRecycleBinNotification)
Handles a notification.
Declaration
public void Handle(MediaMovedToRecycleBinNotification notification)
Parameters
| Type | Name | Description |
|---|---|---|
| MediaMovedToRecycleBinNotification | notification | The notification. |
Handle(MediaSavingNotification)
Handles a notification.
Declaration
public void Handle(MediaSavingNotification notification)
Parameters
| Type | Name | Description |
|---|---|---|
| MediaSavingNotification | notification | The notification. |
Handle(MemberDeletedNotification)
Handles a notification.
Declaration
public void Handle(MemberDeletedNotification notification)
Parameters
| Type | Name | Description |
|---|---|---|
| MemberDeletedNotification | notification | The notification. |
TryGetMediaPath(string?, object?, out string?)
Tries to get a media path for a given property editor alias
Declaration
public bool TryGetMediaPath(string? propertyEditorAlias, object? value, out string? mediaPath)
Parameters
| Type | Name | Description |
|---|---|---|
| string | propertyEditorAlias | The property editor alias |
| object | value | The value of the property |
| string | mediaPath | The media path |
Returns
| Type | Description |
|---|---|
| bool | True if a media path was returned |