-
Notifications
You must be signed in to change notification settings - Fork 1
/
Migrations.cs
42 lines (32 loc) · 1.09 KB
/
Migrations.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
38
39
40
41
42
using OrchardCore.ContentManagement.Metadata;
using OrchardCore.ContentManagement.Metadata.Settings;
using OrchardCore.Data.Migration;
using System.Threading.Tasks;
namespace Etch.OrchardCore.Blocks
{
public class Migrations : DataMigration
{
#region Dependencies
private readonly IContentDefinitionManager _contentDefinitionManager;
#endregion
#region Constructor
public Migrations(IContentDefinitionManager contentDefinitionManager)
{
_contentDefinitionManager = contentDefinitionManager;
}
#endregion
#region Migrations
public async Task<int> CreateAsync()
{
await _contentDefinitionManager.AlterPartDefinitionAsync("BlockBodyPart", builder => builder
.Attachable()
.Reusable()
.WithDisplayName("Block Body")
.WithDescription("Provides rich text editor for curating content for body of content item.")
.WithDefaultPosition("5")
);
return 1;
}
#endregion
}
}