V14/fix/element switch validation (#16421)
* Added Element <-> Document type switch validation * Apply HasElementconfigured to block grid and block list Fix smalle bug + optimization * Moved some of the logic into warnings trough notifcationhandlers and eventmessages * Cleanup * Update openApi spec (merge changes) * Add IsElement check between parent and child on creation * Typos * Transformed HasElementConfigured into HasElementConfigured * Typo Co-authored-by: Kenn Jacobsen <kja@umbraco.dk> * IsElement Validation refactor Moved validation logic regarding doctype IsElement switch into its own service as it will be consumed by more things down the line * commit missing services... * Naming improvements * Bugfix * First batch of integration tests for ElementSwitchValidator * More integration tests! * Little reformatting * Changed the default values of block based configuration to match expected values. --------- Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
This commit is contained in:
@@ -114,6 +114,15 @@ public abstract class BlockValuePropertyValueEditorBase<TValue, TLayout> : DataV
|
||||
MapBlockItemDataToEditor(property, blockValue.SettingsData);
|
||||
}
|
||||
|
||||
protected IEnumerable<Guid> ConfiguredElementTypeKeys(IBlockConfiguration configuration)
|
||||
{
|
||||
yield return configuration.ContentElementTypeKey;
|
||||
if (configuration.SettingsElementTypeKey is not null)
|
||||
{
|
||||
yield return configuration.SettingsElementTypeKey.Value;
|
||||
}
|
||||
}
|
||||
|
||||
private void MapBlockItemDataToEditor(IProperty property, List<BlockItemData> items)
|
||||
{
|
||||
var valEditors = new Dictionary<Guid, IDataValueEditor>();
|
||||
|
||||
Reference in New Issue
Block a user