Skip to content

Commit

Permalink
Fixes #12678 - Added overload methods for backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ns8482e committed Oct 22, 2022
1 parent 4112060 commit 3c9ed6e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ await _drivers.InvokeAsync(async (driver, model, context) =>
return shape;
}

public async Task<IShape> BuildEditorAsync(TModel model, IUpdateModel updater, bool isNew, string group = null, string htmlPrefix = "")
public async Task<IShape> BuildEditorAsync(TModel model, IUpdateModel updater, bool isNew, string group, string htmlPrefix)
{
var actualShapeType = typeof(TModel).Name + "_Edit";

Expand Down Expand Up @@ -104,7 +104,7 @@ await _drivers.InvokeAsync(async (driver, model, context) =>
return shape;
}

public async Task<IShape> UpdateEditorAsync(TModel model, IUpdateModel updater, bool isNew, string group = null, string htmlPrefix = "")
public async Task<IShape> UpdateEditorAsync(TModel model, IUpdateModel updater, bool isNew, string group, string htmlPrefix)
{
var actualShapeType = typeof(TModel).Name + "_Edit";

Expand Down
12 changes: 10 additions & 2 deletions src/OrchardCore/OrchardCore.DisplayManagement/IDisplayManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@ namespace OrchardCore.DisplayManagement
public interface IDisplayManager<TModel>
{
Task<IShape> BuildDisplayAsync(TModel model, IUpdateModel updater, string displayType = "", string groupId = "");
Task<IShape> BuildEditorAsync(TModel model, IUpdateModel updater, bool isNew, string groupId = "", string htmlPrefix = "");
Task<IShape> UpdateEditorAsync(TModel model, IUpdateModel updater, bool isNew, string groupId = "", string htmlPrefix = "");

Task<IShape> BuildEditorAsync(TModel model, IUpdateModel updater, bool isNew, string groupId = "")
=> BuildEditorAsync(model, updater, isNew, groupId, "");

Task<IShape> BuildEditorAsync(TModel model, IUpdateModel updater, bool isNew, string groupId, string htmlPrefix);

Task<IShape> UpdateEditorAsync(TModel model, IUpdateModel updater, bool isNew, string groupId = "")
=> UpdateEditorAsync(model, updater, isNew, groupId, "");

Task<IShape> UpdateEditorAsync(TModel model, IUpdateModel updater, bool isNew, string groupId, string htmlPrefix);
}
}

0 comments on commit 3c9ed6e

Please sign in to comment.