Merge remote-tracking branch 'origin/release/15.0' into v15/dev

# Conflicts:
#	src/Umbraco.PublishedCache.HybridCache/Services/MediaCacheService.cs
#	src/Umbraco.Web.UI.Client
#	tests/Umbraco.Tests.Common/Builders/MediaTypeEditingBuilder.cs
This commit is contained in:
Bjarke Berg
2024-10-10 11:11:08 +02:00
35 changed files with 833 additions and 126 deletions

View File

@@ -232,7 +232,8 @@ public static class BuilderExtensions
return builder;
}
public static T WithPropertyValues<T>(this T builder, object propertyValues, string? culture = null, string? segment = null)
public static T WithPropertyValues<T>(this T builder, object propertyValues, string? culture = null,
string? segment = null)
where T : IWithPropertyValues
{
builder.PropertyValues = propertyValues;

View File

@@ -41,7 +41,8 @@ public class MediaTypeEditingBuilder : ContentTypeEditingBaseBuilder<MediaTypeEd
.Build();
}
public static MediaTypeCreateModel CreateBasicFolderMediaType(string alias = "basicFolder", string name = "BasicFolder")
public static MediaTypeCreateModel CreateBasicFolderMediaType(string alias = "basicFolder",
string name = "BasicFolder")
{
var builder = new MediaTypeEditingBuilder();
return (MediaTypeCreateModel)builder

View File

@@ -4,16 +4,16 @@ using Umbraco.Extensions;
namespace Umbraco.Cms.Tests.Common.TestHelpers;
public class ContentTypeUpdateHelper
public static class ContentTypeUpdateHelper
{
public ContentTypeUpdateModel CreateContentTypeUpdateModel(IContentType contentType)
public static ContentTypeUpdateModel CreateContentTypeUpdateModel(IContentType contentType)
{
var updateModel = new ContentTypeUpdateModel();
var model = MapBaseProperties<ContentTypeUpdateModel>(contentType, updateModel);
return model;
}
private T MapBaseProperties<T>(IContentType contentType, T model) where T : ContentTypeModelBase
private static T MapBaseProperties<T>(IContentType contentType, T model) where T : ContentTypeModelBase
{
model.Alias = contentType.Alias;
model.Name = contentType.Name;