Class ImageCropperPropertyEditor
Represents an image cropper property editor.
Namespace: Umbraco.Web.PropertyEditors
Assembly: Umbraco.Web.dll
Syntax
[DataEditor("Umbraco.ImageCropper", "Image Cropper", "imagecropper", ValueType = "JSON", HideLabel = false, Group = "Media", Icon = "icon-crop")]
public class ImageCropperPropertyEditor : DataEditor, IDataEditor, IDiscoverable, IDataEditorWithMediaPath
Constructors
View SourceImageCropperPropertyEditor(ILogger, IMediaFileSystem, IContentSection, IDataTypeService)
Initializes a new instance of the ImageCropperPropertyEditor class.
Declaration
public ImageCropperPropertyEditor(ILogger logger, IMediaFileSystem mediaFileSystem, IContentSection contentSettings, IDataTypeService dataTypeService)
Parameters
Type | Name | Description |
---|---|---|
ILogger | logger | |
IMediaFileSystem | mediaFileSystem | |
IContentSection | contentSettings | |
IDataTypeService | dataTypeService |
Methods
View SourceContentServiceCopied(IContentService, CopyEventArgs<IContent>)
After a content has been copied, also copy uploaded files.
Declaration
public void ContentServiceCopied(IContentService sender, CopyEventArgs<IContent> args)
Parameters
Type | Name | Description |
---|---|---|
IContentService | sender | The event sender. |
CopyEventArgs<IContent> | args | The event arguments. |
ContentServiceSaving(IContentService, SaveEventArgs<IContent>)
After a content item has been saved, auto-fill the properties.
Declaration
public void ContentServiceSaving(IContentService sender, SaveEventArgs<IContent> args)
Parameters
Type | Name | Description |
---|---|---|
IContentService | sender | The event sender. |
SaveEventArgs<IContent> | args | The event arguments. |
CreateConfigurationEditor()
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. |
GetMediaPath(Object)
Declaration
public string GetMediaPath(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value |
Returns
Type | Description |
---|---|
System.String |
MediaServiceCreated(IMediaService, NewEventArgs<IMedia>)
After a media has been created, auto-fill the properties.
Declaration
public void MediaServiceCreated(IMediaService sender, NewEventArgs<IMedia> args)
Parameters
Type | Name | Description |
---|---|---|
IMediaService | sender | The event sender. |
NewEventArgs<IMedia> | args | The event arguments. |
MediaServiceSaving(IMediaService, SaveEventArgs<IMedia>)
After a media has been saved, auto-fill the properties.
Declaration
public void MediaServiceSaving(IMediaService sender, SaveEventArgs<IMedia> args)
Parameters
Type | Name | Description |
---|---|---|
IMediaService | sender | The event sender. |
SaveEventArgs<IMedia> | args | The event arguments. |