Revert breaking changes

This commit is contained in:
Bjarke Berg
2024-01-23 14:46:28 +01:00
parent 4421b920f0
commit b3d6c60ce2

View File

@@ -130,6 +130,23 @@ public class DataValueReferenceFactoryCollection : BuilderCollectionBase<IDataVa
return automaticRelationTypeAliases;
}
[Obsolete("Use non-obsolete GetAutomaticRelationTypesAliases. This will be removed in Umbraco 15.")]
public ISet<string> GetAutomaticRelationTypesAliases(IPropertyCollection properties, PropertyEditorCollection propertyEditors)
{
// Always add default automatic relation types
var automaticRelationTypeAliases = new HashSet<string>(Constants.Conventions.RelationTypes.AutomaticRelationTypes);
// Only add relation types that are used in the properties
foreach (IProperty property in properties)
{
if (propertyEditors.TryGet(property.PropertyType.PropertyEditorAlias, out IDataEditor? dataEditor))
{
automaticRelationTypeAliases.UnionWith(GetAutomaticRelationTypesAliasesEnumerable(dataEditor));
}
}
return automaticRelationTypeAliases;
}
/// <summary>
/// Gets the automatic relation types aliases.