public void Process(PopulateScribanMailActionModelArgs args) { var blog = _blogManager.GetCurrentBlog(args.WorkflowPipelineArgs.DataItem); if (blog != null) { args.AddModel(ModelKey, blog); } }
public void Process(PopulateScribanMailActionModelArgs args) { if (args.CommentItem == null) { return; } var entryItem = new CommentItem(args.WorkflowPipelineArgs.DataItem); args.AddModel(ModelKey, entryItem); }
public void Process(PopulateScribanMailActionModelArgs args) { if (args.EntryItem == null) { return; } var entryItem = new EntryItem(args.EntryItem); args.AddModel(EntryModelKey, entryItem); if (!string.IsNullOrEmpty(entryItem.InnerItem.Statistics.CreatedBy)) { var createdByUser = GetUser(entryItem.InnerItem.Statistics.CreatedBy); args.AddModel(CreatedByModelKey, createdByUser.Profile); } if (!string.IsNullOrEmpty(entryItem.InnerItem.Statistics.UpdatedBy)) { var updatedByUser = GetUser(entryItem.InnerItem.Statistics.UpdatedBy); args.AddModel(UpdatedByModelKey, updatedByUser.Profile); } }
public void Process(PopulateScribanMailActionModelArgs args) { var dataItem = args.WorkflowPipelineArgs.DataItem; var workflow = dataItem.State.GetWorkflow(); var events = new WorkflowEvent[0]; if (workflow != null) { events = workflow.GetHistory(dataItem); } args.AddModel(ModelKey, events); }
public void Process(PopulateScribanMailActionModelArgs args) { args.AddModel(ModelKey, _user ?? Context.User); }
public void Process(PopulateScribanMailActionModelArgs args) { args.AddModel(ModelKey, DateTime.Now); }
public void Process(PopulateScribanMailActionModelArgs args) { args.AddModel(ModelKey, _site ?? Context.Site); }
public void Process(PopulateScribanMailActionModelArgs args) { var nextStateItem = GetNextStateItem(args.WorkflowPipelineArgs.ProcessorItem.InnerItem); args.AddModel(ModelKey, nextStateItem == null ? string.Empty : nextStateItem.Name); }