public BlockListPropertyEditor( IDataValueEditorFactory dataValueEditorFactory, PropertyEditorCollection propertyEditors, IIOHelper ioHelper) : this(dataValueEditorFactory, propertyEditors, ioHelper, StaticServiceProvider.Instance.GetRequiredService <IEditorConfigurationParser>()) { }
public BlockListPropertyEditor( IDataValueEditorFactory dataValueEditorFactory, PropertyEditorCollection propertyEditors, IIOHelper ioHelper) : base(dataValueEditorFactory, propertyEditors) { _ioHelper = ioHelper; }
public BlockListPropertyEditor( IDataValueEditorFactory dataValueEditorFactory, PropertyEditorCollection propertyEditors, IIOHelper ioHelper, IEditorConfigurationParser editorConfigurationParser) : base(dataValueEditorFactory, propertyEditors) { _ioHelper = ioHelper; _editorConfigurationParser = editorConfigurationParser; }
public NestedContentPropertyValueEditor( IDataTypeService dataTypeService, ILocalizedTextService localizedTextService, IContentTypeService contentTypeService, IShortStringHelper shortStringHelper, DataEditorAttribute attribute, PropertyEditorCollection propertyEditors, ILogger <NestedContentPropertyEditor> logger, IJsonSerializer jsonSerializer, IIOHelper ioHelper, IPropertyValidationService propertyValidationService) : base(localizedTextService, shortStringHelper, jsonSerializer, ioHelper, attribute) { _propertyEditors = propertyEditors; _dataTypeService = dataTypeService; _logger = logger; _nestedContentValues = new NestedContentValues(contentTypeService); Validators.Add(new NestedContentValidator(propertyValidationService, _nestedContentValues, contentTypeService)); }
public BlockEditorPropertyEditor( IDataValueEditorFactory dataValueEditorFactory, PropertyEditorCollection propertyEditors) : base(dataValueEditorFactory) => PropertyEditors = propertyEditors;
// TODO: We could further reduce circular dependencies with PropertyEditorCollection by not having IDataValueReference implemented // by property editors and instead just use the already built in IDataValueReferenceFactory and/or refactor that into a more normal collection public IEnumerable <UmbracoEntityReference> GetAllReferences(IPropertyCollection properties, PropertyEditorCollection propertyEditors) { var trackedRelations = new HashSet <UmbracoEntityReference>(); foreach (var p in properties) { if (!propertyEditors.TryGet(p.PropertyType.PropertyEditorAlias, out var editor)) { continue; } //TODO: We will need to change this once we support tracking via variants/segments // for now, we are tracking values from ALL variants foreach (var propertyVal in p.Values) { var val = propertyVal.EditedValue; var valueEditor = editor.GetValueEditor(); if (valueEditor is IDataValueReference reference) { var refs = reference.GetReferences(val); foreach (var r in refs) { trackedRelations.Add(r); } } // Loop over collection that may be add to existing property editors // implementation of GetReferences in IDataValueReference. // Allows developers to add support for references by a // package /property editor that did not implement IDataValueReference themselves foreach (var item in this) { // Check if this value reference is for this datatype/editor // Then call it's GetReferences method - to see if the value stored // in the dataeditor/property has referecnes to media/content items if (item.IsForEditor(editor)) { foreach (var r in item.GetDataValueReference().GetReferences(val)) { trackedRelations.Add(r); } } } } } return(trackedRelations); }
public PropertyCacheCompression( IPropertyCacheCompressionOptions compressionOptions, IReadOnlyDictionary <int, IContentTypeComposition> contentTypes, PropertyEditorCollection propertyEditors, ConcurrentDictionary <(int, string, bool), bool> compressedStoragePropertyEditorCache)