Skip to content

Latest commit

 

History

History
142 lines (131 loc) · 4.4 KB

File metadata and controls

142 lines (131 loc) · 4.4 KB
versionFrom
9.0.0

MediaTypeService Notifications

:::note If you are using Umbraco 8 or any lower version, please refer to the MediaTypeService Events article instead. :::

The MediaTypeService class implements IMediaTypeService. It provides access to operations involving IMediaType.

Notification Members Description
MediaTypeSavingNotification
  • IEnumerable<IMediaType> SavedEntities
  • EventMessages Messages
  • IDictionary<string,object> State
  • bool Cancel
Published when MediaTypeService.Save is called in the API.
SavedEntities: Gets the collection of IMediaType objects being saved.
MediaTypeSavedNotification
  • IEnumerable<IMediaType> SavedEntities
  • EventMessages Messages
  • IDictionary<string,object> State
Published when MediaTypeService.Save is called in the API, after the entities has been saved.
NOTE: See here on how to determine if the entity is brand new
SavedEntities: Gets the collection of saved IMediaType objects.
MediaTypeDeletingNotification
  • IEnumerable<IMediaType> DeletedEntities
  • EventMessages Messages
  • IDictionary<string,object> State
  • bool Cancel
Published when MediaTypeService.Delete is called in the API.
DeletedEntities: Gets the collection of IMediaType objects being deleted.
MediaTypeDeletedNotification
  • IEnumerable<IMediaType> DeletedEntities
  • EventMessages Messages
  • IDictionary<string,object> State
Published when MediaTypeService.Delete is called in the API, after the entities has been deleted.
DeletedEntities: Gets the collection of deleted IMediaType objects.
MediaTypeMovingNotification
  • IEnumerable<MoveEventInfo<IMediaType>> MoveInfoCollection
  • EventMessages Messages
  • IDictionary<string,object> State
  • bool Cancel
Published when MediaTypeService.Move is called in the API
MoveInfoCollection will for each moving entity provide:
  1. Entity: Gets the IMediaType object being moved
  2. OriginalPath: The original path the entity is moved from
  3. NewParentId: Gets the Id of the parent the entity will have after it has been moved
MediaTypeMovedNotification
  • IEnumerable<MoveEventInfo<IMediaType>> MoveInfoCollection
  • EventMessages Messages
  • IDictionary<string,object> State
Published when MediaTypeService.Move is called in the API, after the entities has been moved.
MoveInfoCollection will for each moving entity provide:
  1. Entity: Gets the IMediaType object being moved
  2. OriginalPath: The original path the entity is moved from
  3. NewParentId: Gets the Id of the parent the entity will have after it has been moved
MediaTypeChangedNotification
  • IEnumerable<MediaTypeChange<IMediaType>> Changes
  • EventMessages Messages
  • IDictionary<string,object> State
Published when a MediaType is saved or deleted, after the transaction has completed. This is mainly used for caching purposes, and generally not recommended, use Saved and Deleted notifications instead.
Changes will for each item affected by the change prove:
  1. Item: The IMediaType affected by the change.
  2. ChangeTypes: The type of change: Create, Remove, RefreshMain, etc.