Search Results for

    Show / Hide Table of Contents
    View Source

    Interface INotificationService

    Namespace: Umbraco.Cms.Core.Services
    Assembly: Umbraco.Core.dll
    Syntax
    public interface INotificationService : IService

    Methods

    View Source

    CreateNotification(IUser, IEntity, String)

    Creates a new notification

    Declaration
    Notification CreateNotification(IUser user, IEntity entity, string action)
    Parameters
    Type Name Description
    IUser user
    IEntity entity
    System.String action

    The action letter - note: this is a string for future compatibility

    Returns
    Type Description
    Notification
    View Source

    DeleteNotifications(IEntity)

    Deletes notifications by entity

    Declaration
    void DeleteNotifications(IEntity entity)
    Parameters
    Type Name Description
    IEntity entity
    View Source

    DeleteNotifications(IUser)

    Deletes notifications by user

    Declaration
    void DeleteNotifications(IUser user)
    Parameters
    Type Name Description
    IUser user
    View Source

    DeleteNotifications(IUser, IEntity)

    Delete notifications by user and entity

    Declaration
    void DeleteNotifications(IUser user, IEntity entity)
    Parameters
    Type Name Description
    IUser user
    IEntity entity
    View Source

    GetEntityNotifications(IEntity)

    Returns the notifications for an entity

    Declaration
    IEnumerable<Notification>? GetEntityNotifications(IEntity entity)
    Parameters
    Type Name Description
    IEntity entity
    Returns
    Type Description
    System.Nullable<IEnumerable<Notification>>
    View Source

    GetUserNotifications(IUser)

    Gets the notifications for the user

    Declaration
    IEnumerable<Notification>? GetUserNotifications(IUser user)
    Parameters
    Type Name Description
    IUser user
    Returns
    Type Description
    System.Nullable<IEnumerable<Notification>>
    View Source

    GetUserNotifications(IUser, String)

    Gets the notifications for the user based on the specified node path

    Declaration
    IEnumerable<Notification>? GetUserNotifications(IUser user, string path)
    Parameters
    Type Name Description
    IUser user
    System.String path
    Returns
    Type Description
    System.Nullable<IEnumerable<Notification>>
    Remarks

    Notifications are inherited from the parent so any child node will also have notifications assigned based on it's parent (ancestors)

    View Source

    SendNotifications(IUser, IEnumerable<IContent>, String, String, Uri, Func<(IUser user, NotificationEmailSubjectParams subject), String>, Func<(IUser user, NotificationEmailBodyParams body, Boolean isHtml), String>)

    Sends the notifications for the specified user regarding the specified nodes and action.

    Declaration
    void SendNotifications(IUser operatingUser, IEnumerable<IContent> entities, string action, string actionName, Uri siteUri, Func<(IUser user, NotificationEmailSubjectParams subject), string> createSubject, Func<(IUser user, NotificationEmailBodyParams body, bool isHtml), string> createBody)
    Parameters
    Type Name Description
    IUser operatingUser
    IEnumerable<IContent> entities
    System.String action
    System.String actionName
    Uri siteUri
    Func<System.ValueTuple<IUser, NotificationEmailSubjectParams>, System.String> createSubject
    Func<System.ValueTuple<IUser, NotificationEmailBodyParams, System.Boolean>, System.String> createBody
    View Source

    SetNotifications(IUser, IEntity, String[])

    Sets the specific notifications for the user and entity

    Declaration
    IEnumerable<Notification>? SetNotifications(IUser user, IEntity entity, string[] actions)
    Parameters
    Type Name Description
    IUser user
    IEntity entity
    System.String[] actions
    Returns
    Type Description
    System.Nullable<IEnumerable<Notification>>
    Remarks

    This performs a full replace

    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • CreateNotification(IUser, IEntity, String)
      • DeleteNotifications(IEntity)
      • DeleteNotifications(IUser)
      • DeleteNotifications(IUser, IEntity)
      • GetEntityNotifications(IEntity)
      • GetUserNotifications(IUser)
      • GetUserNotifications(IUser, String)
      • SendNotifications(IUser, IEnumerable<IContent>, String, String, Uri, Func<(IUser user, NotificationEmailSubjectParams subject), String>, Func<(IUser user, NotificationEmailBodyParams body, Boolean isHtml), String>)
      • SetNotifications(IUser, IEntity, String[])
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX