2020-05-11 15:34:47 +02:00
using Microsoft.Extensions.DependencyInjection ;
2020-05-13 14:06:11 +02:00
using System.Collections.Generic ;
using zero.Core.Options ;
2020-05-11 15:34:47 +02:00
using zero.Core.Plugins ;
2020-05-13 14:06:11 +02:00
using zero.Debug.TestData ;
2020-05-11 15:34:47 +02:00
namespace zero.TestData
{
2020-05-12 15:22:39 +02:00
public class TestPlugin : IZeroPlugin
2020-05-11 15:34:47 +02:00
{
2020-05-19 10:57:35 +02:00
public void Configure ( IZeroPluginOptions plugin , IZeroOptions zero )
2020-05-11 15:34:47 +02:00
{
2020-05-19 10:57:35 +02:00
plugin . Name = "Test Plugin" ;
2020-08-20 15:11:41 +02:00
//ISection spaceSection = zero.Sections.GetAllItems().FirstOrDefault(x => x.Alias == Constants.Sections.Spaces);
//zero.Sections.Remove(spaceSection);
2020-07-06 15:58:31 +02:00
2020-09-01 12:20:20 +02:00
zero . Spaces . Add < TeamMemberSpace >();
2020-05-14 13:32:33 +02:00
zero . Spaces . AddList < News >( "news" , "News" , "Articles about the company" , "fth-edit" );
zero . Spaces . AddSeparator ();
zero . Spaces . AddEditor < SocialContent >( "social" , "Social" , "Links to social media" , "fth-twitter" );
2020-05-11 15:34:47 +02:00
2020-05-14 13:32:33 +02:00
zero . Features . Add ( TestFeatures . Wishlist , "Wishlist" , "Frontend wishlist for logged-in users" );
zero . Features . Add ( TestFeatures . SocialShopping , "Social shopping" , "Integrate products into social media portals" );
2020-05-13 14:06:11 +02:00
2020-05-19 15:53:01 +02:00
zero . Pages . Add < NewsPage >( "news" , "News" , "News about the company" , "fth-file-text" );
zero . Pages . Add < ContentPage >( "content" , "Page" , "Page consisting of modules" , "fth-box" , allowAsRoot : true , allowAllChildrenTypes : true );
2020-08-27 11:51:53 +02:00
zero . Pages . Add < ContentPage >( "root" , "Homepage" , "Entry point for the website" , "fth-home" , allowAsRoot : true , allowAllChildrenTypes : true , onlyAtRoot : true );
2020-05-19 15:53:01 +02:00
zero . Pages . Add < RedirectPage >( "redirect" , "Redirect" , "Redirect to another page or an external URL" , "fth-external-link" , allowAsRoot : true , allowedChildrenTypes : new List < string >() { "content" , "redirect" });
2020-08-19 11:22:45 +02:00
zero . Modules . Add < RichtextModule >( "richtext" , "Richtext" , "Simple richtext block editor" , "fth-align-left" , "Texts" );
zero . Modules . Add < HeadlineModule >( "headline" , "Headline" , "Headline with optional subline" , "fth-underline" , "Texts" );
zero . Modules . Add < TextWithImageModule >( "textWithImage" , "Text with image" , "Short textblock with image" , "fth-layers" , "Texts" , new List < string >() { "root" });
zero . Modules . Add < GalleryModule >( "gallery" , "Gallery" , "Image gallery grid" , "fth-image" , "Media" );
2020-08-20 14:35:08 +02:00
zero . Modules . Add < DownloadModule >( "download" , "Downloads" , "List containing downloads" , "fth-download" , "Misc" );
zero . Modules . Add < OffsetModule >( "offset" , "Offset" , "Offset between two modules" , "fth-code" , "Misc" );
2020-09-01 15:23:21 +02:00
zero . Modules . Add < NestedModule >( "nested" , "Nested" , "Add nested modules" , "fth-layers" , "Misc" );
2020-05-11 15:34:47 +02:00
}
2020-05-18 15:55:43 +02:00
public void ConfigureServices ( IServiceCollection services )
{
2020-08-28 01:10:55 +02:00
//services.Replace<IChannel, SalesChannel>();
2020-05-18 15:55:43 +02:00
services . AddTransient < ITestService , TestService >();
}
2020-05-11 15:34:47 +02:00
}
}