示例#1
0
        public override void Process(GetPageEditorNotificationsArgs arguments)
        {
            Assert.ArgumentNotNull(arguments, "arguments");
            if (arguments.ContextItem == null || Sitecore.Context.User.IsAdministrator)
            {
                return;
            }

            NotificationsController       controller    = new NotificationsController();
            List <PageEditorNotification> notifications = controller.GetPageEditorNotifications(arguments.ContextItem);

            if (notifications.Count > 0)
            {
                for (int i = 0; i < notifications.Count; i++)
                {
                    arguments.Notifications.Add(notifications[i]);
                }
            }
        }