using System.Collections.Generic; using JetBrains.Annotations; using Orchard.Core.Common.Models; using Orchard.Data; using Orchard.ContentManagement; using Orchard.ContentManagement.Handlers; using Orchard.Sandbox.Controllers; namespace Orchard.Sandbox.Models { [UsedImplicitly] public class SandboxContentHandler : ContentHandler { public SandboxContentHandler( IRepository pageRepository, IRepository settingsRepository) { // define the "sandboxpage" content type Filters.Add(new ActivatingFilter(SandboxPageDriver.ContentType.Name)); Filters.Add(new ActivatingFilter(SandboxPageDriver.ContentType.Name)); Filters.Add(new ActivatingFilter(SandboxPageDriver.ContentType.Name)); Filters.Add(new ActivatingFilter(SandboxPageDriver.ContentType.Name)); Filters.Add(new StorageFilter(pageRepository) ); // add settings to site, and simple record-template gui Filters.Add(new ActivatingFilter>("site")); Filters.Add(new StorageFilter(settingsRepository)); Filters.Add(new TemplateFilterForRecord("SandboxSettings", "Parts/Sandbox.SiteSettings")); } } }