-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathSemrushContentApp.cs
37 lines (32 loc) · 995 Bytes
/
SemrushContentApp.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System.Collections.Generic;
#if NETCOREAPP
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.ContentEditing;
using Umbraco.Cms.Core.Models.Membership;
#else
using Umbraco.Core.Models;
using Umbraco.Core.Models.ContentEditing;
using Umbraco.Core.Models.Membership;
#endif
namespace Umbraco.Cms.Integrations.SEO.Semrush
{
public class SemrushContentApp : IContentAppFactory
{
public ContentApp GetContentAppFor(object source, IEnumerable<IReadOnlyUserGroup> userGroups)
{
if (!(source is IContent))
return null;
var content = (IContent)source;
if (content.Id == 0)
return null;
return new ContentApp
{
Alias = "semrush",
Name = "Semrush",
Icon = "icon-files",
View = "/App_Plugins/UmbracoCms.Integrations/SEO/Semrush/semrush.html",
Weight = 1
};
}
}
}