forked from umbraco/Umbraco-CMS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e04efe6
commit 1d2272f
Showing
9 changed files
with
221 additions
and
169 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
src/Umbraco.Core/ContentApps/DictionaryContentAppFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.