fix build

This commit is contained in:
Shannon
2020-06-15 23:22:29 +10:00
parent 32e3ebb6fb
commit 19a114ac2b
3 changed files with 9 additions and 6 deletions

View File

@@ -6,6 +6,7 @@ namespace Umbraco.Core.Models.Blocks
// TODO: Rename this, we don't want to use the name "Helper"
// TODO: What is this? This requires code docs
// TODO: This is not used publicly at all - therefore it probably shouldn't be public
// TODO: These could easily be abstract methods on the underlying BlockEditorPropertyEditor instead
public interface IBlockEditorDataHelper
{
// TODO: Does this abstraction need a reference to JObject? Maybe it does but ideally it doesn't

View File

@@ -23,14 +23,16 @@ namespace Umbraco.Web.PropertyEditors
public const string ContentTypeKeyPropertyKey = "contentTypeKey";
public const string UdiPropertyKey = "udi";
private readonly IBlockEditorDataHelper _dataHelper;
private readonly ILocalizedTextService _localizedTextService;
private readonly Lazy<PropertyEditorCollection> _propertyEditors;
private readonly IDataTypeService _dataTypeService;
private readonly IContentTypeService _contentTypeService;
public BlockEditorPropertyEditor(ILogger logger, Lazy<PropertyEditorCollection> propertyEditors, IDataTypeService dataTypeService, IContentTypeService contentTypeService, IBlockEditorDataHelper dataHelper)
public BlockEditorPropertyEditor(ILogger logger, Lazy<PropertyEditorCollection> propertyEditors, IDataTypeService dataTypeService, IContentTypeService contentTypeService, IBlockEditorDataHelper dataHelper, ILocalizedTextService localizedTextService)
: base(logger)
{
_dataHelper = dataHelper;
_localizedTextService = localizedTextService;
_propertyEditors = propertyEditors;
_dataTypeService = dataTypeService;
_contentTypeService = contentTypeService;
@@ -41,7 +43,7 @@ namespace Umbraco.Web.PropertyEditors
#region Value Editor
protected override IDataValueEditor CreateValueEditor() => new BlockEditorPropertyValueEditor(Attribute, _dataHelper, PropertyEditors, _dataTypeService, _contentTypeService);
protected override IDataValueEditor CreateValueEditor() => new BlockEditorPropertyValueEditor(Attribute, _dataHelper, PropertyEditors, _dataTypeService, _contentTypeService, _localizedTextService);
internal class BlockEditorPropertyValueEditor : DataValueEditor, IDataValueReference
{
@@ -50,14 +52,14 @@ namespace Umbraco.Web.PropertyEditors
private readonly IDataTypeService _dataTypeService;
private readonly BlockEditorValues _blockEditorValues;
public BlockEditorPropertyValueEditor(DataEditorAttribute attribute, IBlockEditorDataHelper dataHelper, PropertyEditorCollection propertyEditors, IDataTypeService dataTypeService, IContentTypeService contentTypeService)
public BlockEditorPropertyValueEditor(DataEditorAttribute attribute, IBlockEditorDataHelper dataHelper, PropertyEditorCollection propertyEditors, IDataTypeService dataTypeService, IContentTypeService contentTypeService, ILocalizedTextService textService)
: base(attribute)
{
_dataHelper = dataHelper;
_propertyEditors = propertyEditors;
_dataTypeService = dataTypeService;
_blockEditorValues = new BlockEditorValues(dataHelper, contentTypeService);
Validators.Add(new BlockEditorValidator(propertyEditors, dataTypeService, _blockEditorValues));
Validators.Add(new BlockEditorValidator(_blockEditorValues, propertyEditors, dataTypeService, textService));
}
public IEnumerable<UmbracoEntityReference> GetReferences(object value)

View File

@@ -22,8 +22,8 @@ namespace Umbraco.Web.PropertyEditors
Icon = "icon-thumbnail-list")]
public class BlockListPropertyEditor : BlockEditorPropertyEditor
{
public BlockListPropertyEditor(ILogger logger, Lazy<PropertyEditorCollection> propertyEditors, IDataTypeService dataTypeService, IContentTypeService contentTypeService)
: base(logger, propertyEditors, dataTypeService, contentTypeService, new DataHelper())
public BlockListPropertyEditor(ILogger logger, Lazy<PropertyEditorCollection> propertyEditors, IDataTypeService dataTypeService, IContentTypeService contentTypeService, ILocalizedTextService localizedTextService)
: base(logger, propertyEditors, dataTypeService, contentTypeService, new DataHelper(), localizedTextService)
{ }
#region Pre Value Editor