Merge remote-tracking branch 'origin/v8/dev' into v9/dev
# Conflicts: # src/Umbraco.Core/Cache/UserGroupCacheRefresher.cs # src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs # src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryCacheKeys.cs # src/Umbraco.Core/PropertyEditors/MediaPickerWithCropsValueConverter.cs # src/Umbraco.Core/PropertyEditors/Validators/FileExtensionConfigItem.cs # src/Umbraco.Core/PropertyEditors/Validators/FileUploadConfiguration.cs # src/Umbraco.Core/PropertyEditors/Validators/FileUploadConfigurationEditor.cs # src/Umbraco.Core/PropertyEditors/Validators/IFileExtensionConfig.cs # src/Umbraco.Core/PropertyEditors/Validators/IFileExtensionConfigItem.cs # src/Umbraco.Core/PropertyEditors/Validators/MediaPicker3Configuration.cs # src/Umbraco.Core/PropertyEditors/Validators/MediaPicker3ConfigurationEditor.cs # src/Umbraco.Core/PropertyEditors/Validators/MediaPicker3PropertyEditor.cs # src/Umbraco.Infrastructure/Cache/DefaultRepositoryCachePolicy.cs # src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/JsonValueConverter.cs # src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/MediaTypeRepositoryTest.cs # src/Umbraco.Tests/Composing/TypeLoaderTests.cs # src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs # src/Umbraco.Tests/Services/MediaServiceTests.cs # src/Umbraco.Web.BackOffice/Controllers/MediaController.cs # src/Umbraco.Web.Common/Extensions/FriendlyImageCropperTemplateExtensions.cs # src/Umbraco.Web.UI.Client/src/views/propertyeditors/fileupload/fileupload.controller.js # src/Umbraco.Web.UI.NetCore/umbraco/config/lang/da.xml # src/Umbraco.Web.UI.NetCore/umbraco/config/lang/en.xml # src/Umbraco.Web.UI.NetCore/umbraco/config/lang/en_us.xml # src/Umbraco.Web/Cache/MemberCacheRefresher.cs # src/Umbraco.Web/PropertyEditors/FileUploadPropertyEditor.cs # src/Umbraco.Web/UrlHelperRenderExtensions.cs
This commit is contained in:
@@ -6,6 +6,7 @@ using Umbraco.Cms.Core.Models;
|
||||
using Umbraco.Cms.Core.Models.PublishedContent;
|
||||
using Umbraco.Cms.Core.PropertyEditors.ValueConverters;
|
||||
using Umbraco.Cms.Core.Routing;
|
||||
using Umbraco.Core.Models;
|
||||
|
||||
namespace Umbraco.Extensions
|
||||
{
|
||||
@@ -36,6 +37,11 @@ namespace Umbraco.Extensions
|
||||
return mediaItem.GetCropUrl(imageUrlGenerator, publishedValueFallback, publishedUrlProvider, cropAlias: cropAlias, useCropDimensions: true);
|
||||
}
|
||||
|
||||
public static string GetCropUrl(this IPublishedContent mediaItem, string cropAlias, IImageUrlGenerator imageUrlGenerator, ImageCropperValue imageCropperValue)
|
||||
{
|
||||
return mediaItem.Url().GetCropUrl(imageUrlGenerator, imageCropperValue, cropAlias: cropAlias, useCropDimensions: true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the underlying image processing service URL by the crop alias using the specified property containing the image cropper Json data on the IPublishedContent item.
|
||||
/// </summary>
|
||||
@@ -397,5 +403,11 @@ namespace Umbraco.Extensions
|
||||
|
||||
return imageUrlGenerator.GetImageUrl(options);
|
||||
}
|
||||
|
||||
public static string GetLocalCropUrl(this MediaWithCrops mediaWithCrops, string alias, IImageUrlGenerator imageUrlGenerator, string cacheBusterValue)
|
||||
{
|
||||
return mediaWithCrops.LocalCrops.Src + mediaWithCrops.LocalCrops.GetCropUrl(alias, imageUrlGenerator, cacheBusterValue: cacheBusterValue);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user