Merge remote-tracking branch 'origin/v10/dev' into v10/feature/nullable-reference-types-in-Umbraco-Core
# Conflicts: # build/build.ps1 # src/Umbraco.Core/Configuration/ConfigConnectionString.cs # src/Umbraco.Core/Configuration/Models/ConnectionStrings.cs # src/Umbraco.Core/Install/InstallSteps/TelemetryIdentifierStep.cs # src/Umbraco.Core/Models/ContentType.cs # src/Umbraco.Infrastructure/Migrations/Install/DatabaseBuilder.cs # tests/Umbraco.Tests.AcceptanceTest/package.json
This commit is contained in:
32
src/Umbraco.Core/ContentApps/DictionaryContentAppFactory.cs
Normal file
32
src/Umbraco.Core/ContentApps/DictionaryContentAppFactory.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System.Collections.Generic;
|
||||
using Umbraco.Cms.Core.Models;
|
||||
using Umbraco.Cms.Core.Models.ContentEditing;
|
||||
using Umbraco.Cms.Core.Models.Membership;
|
||||
|
||||
namespace Umbraco.Cms.Core.ContentApps
|
||||
{
|
||||
internal class DictionaryContentAppFactory : IContentAppFactory
|
||||
{
|
||||
private const int Weight = -100;
|
||||
|
||||
private ContentApp _dictionaryApp;
|
||||
|
||||
public ContentApp GetContentAppFor(object source, IEnumerable<IReadOnlyUserGroup> userGroups)
|
||||
{
|
||||
switch (source)
|
||||
{
|
||||
case IDictionaryItem _:
|
||||
return _dictionaryApp ??= new ContentApp
|
||||
{
|
||||
Alias = "dictionaryContent",
|
||||
Name = "Content",
|
||||
Icon = "icon-document",
|
||||
View = "views/dictionary/views/content/content.html",
|
||||
Weight = Weight
|
||||
};
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user