Rename IsSharedContent (server-side)
This commit is contained in:
@@ -15,7 +15,7 @@ public abstract class BlockLayoutItemBase : IBlockLayoutItem
|
||||
public Guid? SettingsKey { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsSharedContent { get; set; }
|
||||
public bool IsExternalContent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BlockLayoutItemBase" /> class.
|
||||
|
||||
@@ -39,8 +39,7 @@ public interface IBlockLayoutItem
|
||||
/// <summary>
|
||||
/// Indicates if the content source is local or originates from the element service.
|
||||
/// </summary>
|
||||
// TODO KJA: We need a proper name for this.
|
||||
public bool IsSharedContent { get; set; }
|
||||
public bool IsExternalContent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether this layout item references the specified content key.
|
||||
|
||||
+1
-1
@@ -153,7 +153,7 @@ internal abstract class BlockValuePropertyIndexValueFactoryBase<TSerialized> : J
|
||||
// such, so this "top-level aggregation" of shared content keys works in effect.
|
||||
Guid[] sharedElementKeys = layoutsAsArray
|
||||
.Union(layoutsAsArray.SelectMany(l => l.GetContainedLayouts()))
|
||||
.Where(l => l.IsSharedContent)
|
||||
.Where(l => l.IsExternalContent)
|
||||
.Select(l => l.ContentKey)
|
||||
.ToArray();
|
||||
|
||||
|
||||
+2
-2
@@ -151,7 +151,7 @@ internal abstract class BlockPropertyValueCreatorBase<TBlockModel, TBlockItemMod
|
||||
{
|
||||
IPublishedElement? element = null;
|
||||
BlockItemData? data = null;
|
||||
if (layout.IsSharedContent)
|
||||
if (layout.IsExternalContent)
|
||||
{
|
||||
element = await _elementCacheService.GetByKeyAsync(layout.ContentKey, preview);
|
||||
|
||||
@@ -181,7 +181,7 @@ internal abstract class BlockPropertyValueCreatorBase<TBlockModel, TBlockItemMod
|
||||
: null;
|
||||
|
||||
string? resolvedCulture = null;
|
||||
if (layout.IsSharedContent is false)
|
||||
if (layout.IsExternalContent is false)
|
||||
{
|
||||
Fallback fallback = _propertyRenderingContextAccessor.PropertyRenderingContext?.Fallback ?? default;
|
||||
if (BlockExposeFallbackHelper.IsBlockExposed(expose, element.Key, expectedBlockVariationCulture, expectedBlockVariationSegment, fallback, languagesByIsoCode, defaultIsoCode, out resolvedCulture) is false)
|
||||
|
||||
+14
-14
@@ -33,7 +33,7 @@ internal class BlockListWithReusableContentTest : BlockEditorWithReusableContent
|
||||
{
|
||||
Constants.PropertyEditors.Aliases.BlockList,
|
||||
[
|
||||
new BlockListLayoutItem { ContentKey = reusableElementKey, IsSharedContent = true }
|
||||
new BlockListLayoutItem { ContentKey = reusableElementKey, IsExternalContent = true }
|
||||
]
|
||||
},
|
||||
},
|
||||
@@ -85,9 +85,9 @@ internal class BlockListWithReusableContentTest : BlockEditorWithReusableContent
|
||||
{
|
||||
Constants.PropertyEditors.Aliases.BlockList,
|
||||
[
|
||||
new BlockListLayoutItem { ContentKey = reusableElementKey, IsSharedContent = true },
|
||||
new BlockListLayoutItem { ContentKey = reusableElementKey, IsSharedContent = true },
|
||||
new BlockListLayoutItem { ContentKey = reusableElementKey, IsSharedContent = true },
|
||||
new BlockListLayoutItem { ContentKey = reusableElementKey, IsExternalContent = true },
|
||||
new BlockListLayoutItem { ContentKey = reusableElementKey, IsExternalContent = true },
|
||||
new BlockListLayoutItem { ContentKey = reusableElementKey, IsExternalContent = true },
|
||||
]
|
||||
},
|
||||
},
|
||||
@@ -142,7 +142,7 @@ internal class BlockListWithReusableContentTest : BlockEditorWithReusableContent
|
||||
{
|
||||
Constants.PropertyEditors.Aliases.BlockList,
|
||||
[
|
||||
new BlockListLayoutItem { ContentKey = reusableElementKey, SettingsKey = localElementKey, IsSharedContent = true }
|
||||
new BlockListLayoutItem { ContentKey = reusableElementKey, SettingsKey = localElementKey, IsExternalContent = true }
|
||||
]
|
||||
},
|
||||
},
|
||||
@@ -219,7 +219,7 @@ internal class BlockListWithReusableContentTest : BlockEditorWithReusableContent
|
||||
Constants.PropertyEditors.Aliases.BlockList,
|
||||
[
|
||||
new BlockListLayoutItem { ContentKey = localElementKey },
|
||||
new BlockListLayoutItem { ContentKey = reusableElementKey, IsSharedContent = true }
|
||||
new BlockListLayoutItem { ContentKey = reusableElementKey, IsExternalContent = true }
|
||||
]
|
||||
},
|
||||
},
|
||||
@@ -299,7 +299,7 @@ internal class BlockListWithReusableContentTest : BlockEditorWithReusableContent
|
||||
Constants.PropertyEditors.Aliases.BlockList,
|
||||
[
|
||||
new BlockListLayoutItem { ContentKey = localElementKey, SettingsKey = settingsForLocalElementKey },
|
||||
new BlockListLayoutItem { ContentKey = reusableElementKey, SettingsKey = settingsForReusableElementKey, IsSharedContent = true }
|
||||
new BlockListLayoutItem { ContentKey = reusableElementKey, SettingsKey = settingsForReusableElementKey, IsExternalContent = true }
|
||||
]
|
||||
},
|
||||
},
|
||||
@@ -415,7 +415,7 @@ internal class BlockListWithReusableContentTest : BlockEditorWithReusableContent
|
||||
Constants.PropertyEditors.Aliases.BlockList,
|
||||
[
|
||||
new BlockListLayoutItem { ContentKey = localElementKey },
|
||||
new BlockListLayoutItem { ContentKey = reusableElementKey, IsSharedContent = true }
|
||||
new BlockListLayoutItem { ContentKey = reusableElementKey, IsExternalContent = true }
|
||||
]
|
||||
},
|
||||
},
|
||||
@@ -447,7 +447,7 @@ internal class BlockListWithReusableContentTest : BlockEditorWithReusableContent
|
||||
Constants.PropertyEditors.Aliases.BlockList,
|
||||
[
|
||||
new BlockListLayoutItem { ContentKey = localElementKey },
|
||||
new BlockListLayoutItem { ContentKey = reusableElementKey, IsSharedContent = true }
|
||||
new BlockListLayoutItem { ContentKey = reusableElementKey, IsExternalContent = true }
|
||||
]
|
||||
},
|
||||
},
|
||||
@@ -535,7 +535,7 @@ internal class BlockListWithReusableContentTest : BlockEditorWithReusableContent
|
||||
Constants.PropertyEditors.Aliases.BlockList,
|
||||
[
|
||||
new BlockListLayoutItem { ContentKey = localElementKey },
|
||||
new BlockListLayoutItem { ContentKey = reusableElementKey, IsSharedContent = true }
|
||||
new BlockListLayoutItem { ContentKey = reusableElementKey, IsExternalContent = true }
|
||||
]
|
||||
},
|
||||
},
|
||||
@@ -625,7 +625,7 @@ internal class BlockListWithReusableContentTest : BlockEditorWithReusableContent
|
||||
Constants.PropertyEditors.Aliases.BlockList,
|
||||
[
|
||||
new BlockListLayoutItem { ContentKey = localElementKey },
|
||||
new BlockListLayoutItem { ContentKey = reusableElementKey, IsSharedContent = true }
|
||||
new BlockListLayoutItem { ContentKey = reusableElementKey, IsExternalContent = true }
|
||||
]
|
||||
},
|
||||
},
|
||||
@@ -729,7 +729,7 @@ internal class BlockListWithReusableContentTest : BlockEditorWithReusableContent
|
||||
{
|
||||
Constants.PropertyEditors.Aliases.BlockList,
|
||||
[
|
||||
new BlockListLayoutItem { ContentKey = reusableElementKey, IsSharedContent = true }
|
||||
new BlockListLayoutItem { ContentKey = reusableElementKey, IsExternalContent = true }
|
||||
]
|
||||
},
|
||||
},
|
||||
@@ -800,7 +800,7 @@ internal class BlockListWithReusableContentTest : BlockEditorWithReusableContent
|
||||
{
|
||||
Constants.PropertyEditors.Aliases.BlockList,
|
||||
[
|
||||
new BlockListLayoutItem { ContentKey = reusableElementKey, IsSharedContent = true }
|
||||
new BlockListLayoutItem { ContentKey = reusableElementKey, IsExternalContent = true }
|
||||
]
|
||||
},
|
||||
},
|
||||
@@ -863,7 +863,7 @@ internal class BlockListWithReusableContentTest : BlockEditorWithReusableContent
|
||||
{
|
||||
Constants.PropertyEditors.Aliases.BlockList,
|
||||
[
|
||||
new BlockListLayoutItem { ContentKey = reusableElementKey, IsSharedContent = true }
|
||||
new BlockListLayoutItem { ContentKey = reusableElementKey, IsExternalContent = true }
|
||||
]
|
||||
},
|
||||
},
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ internal class RichTextEditorWithReusableContentTests : BlockEditorWithReusableC
|
||||
{
|
||||
{
|
||||
Constants.PropertyEditors.Aliases.RichText, [
|
||||
new RichTextBlockLayoutItem { ContentKey = reusableElementKey, IsSharedContent = true }
|
||||
new RichTextBlockLayoutItem { ContentKey = reusableElementKey, IsExternalContent = true }
|
||||
]
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user