public WorkDocumentsAdminController( IContentManager contentManager, IContentItemDisplayManager contentItemDisplayManager, ISiteService siteService, INotifier notifier, ISession session, IShapeFactory shapeFactory, ILogger <WorkDocumentsAdminController> logger, IHtmlLocalizer <WorkDocumentsAdminController> localizer, IAuthorizationService authorizationService, // IEnumerable<IContentAdminFilter> contentAdminFilters, IContentHandleManager contentAliasManager ) { // _contentAdminFilters = contentAdminFilters; _contentAliasManager = contentAliasManager; _authorizationService = authorizationService; _notifier = notifier; _contentItemDisplayManager = contentItemDisplayManager; _session = session; _siteService = siteService; _contentManager = contentManager; T = localizer; New = shapeFactory; Logger = logger; }
public AdminController( IContentManager contentManager, IContentItemDisplayManager contentItemDisplayManager, IAuthorizationService authorizationService, IContentHandleManager contentAliasManager) { _contentManager = contentManager; _contentAliasManager = contentAliasManager; _contentItemDisplayManager = contentItemDisplayManager; _authorizationService = authorizationService; }
public ContentPickerTreeListController( IContentDefinitionManager contentDefinitionManager, IEnumerable <IContentPickerResultProvider> resultProviders, IContentTreeService contentTreeService, ISession session, IContentManager contentManager, IContentHandleManager contentAliasManager ) { _contentTreeService = contentTreeService; _contentDefinitionManager = contentDefinitionManager; _resultProviders = resultProviders; _session = session; _contentManager = contentManager; _contentAliasManager = contentAliasManager; }
// private IActionContextAccessor Accessor { get; } // private readonly UrlHelper _url; public ListContentItemByAliasTreeNodeProvider(IContentManager contentManager, IListContainerService listContainerService, ISiteService siteService, IContentHandleManager contentAliasManager, ISession session, IServiceProvider serviceProvider) { // _contentDefinitionManager = contentDefinitionManager; _contentManager = contentManager; // _session = session; _listContainerService = listContainerService; _siteService = siteService; _contentAliasManager = contentAliasManager; _session = session; _serviceProvider = serviceProvider; // _authorizationService = authorizationService; // _url = urlHelper; // T = NullLocalizer.Instance; }
public PreviewController( IContentManager contentManager, IContentHandleManager contentHandleManager, IContentItemDisplayManager contentItemDisplayManager, IAuthorizationService authorizationService, ISiteService siteService, ShellSettings shellSettings, IUpdateModelAccessor updateModelAccessor) { _contentManager = contentManager; _contentHandleManager = contentHandleManager; _contentItemDisplayManager = contentItemDisplayManager; _authorizationService = authorizationService; _siteService = siteService; _updateModelAccessor = updateModelAccessor; _homeUrl = ('/' + (shellSettings.RequestUrlPrefix ?? string.Empty)).TrimEnd('/') + '/'; }
public ContentPickerController( IContentManager contentManager, IContentDefinitionManager contentDefinitionManager, ISession session, IShapeFactory shapeFactory, ILogger <ContentPickerController> logger, IHtmlLocalizer <ContentPickerController> localizer, IContentHandleManager contentAliasManager, IListContainerService listContainerService ) { _contentAliasManager = contentAliasManager; _listContainerService = listContainerService; _session = session; _contentManager = contentManager; _contentDefinitionManager = contentDefinitionManager; T = localizer; New = shapeFactory; Logger = logger; }
public AdminController( IAuthorizationService authorizationService, IContentManager contentManager, IContentItemDisplayManager contentItemDisplayManager, IContentDefinitionManager contentDefinitionManager, ISiteService siteService, INotifier notifier, YesSql.ISession session, IShapeFactory shapeFactory, IDisplayManager <ContentOptionsViewModel> contentOptionsDisplayManager, IContentsAdminListQueryService contentsAdminListQueryService, ILogger <AdminController> logger, IHtmlLocalizer <AdminController> htmlLocalizer, IStringLocalizer <AdminController> stringLocalizer, IUpdateModelAccessor updateModelAccessor, IHttpContextAccessor httpContextAccessor, IContentHandleManager contentHandleManager) { _contentHandleManager = contentHandleManager; _authorizationService = authorizationService; _notifier = notifier; _contentItemDisplayManager = contentItemDisplayManager; _session = session; _siteService = siteService; _contentManager = contentManager; _contentDefinitionManager = contentDefinitionManager; _updateModelAccessor = updateModelAccessor; _httpContextAccessor = httpContextAccessor; _contentOptionsDisplayManager = contentOptionsDisplayManager; _contentsAdminListQueryService = contentsAdminListQueryService; H = htmlLocalizer; S = stringLocalizer; _shapeFactory = shapeFactory; New = shapeFactory; _logger = logger; }
public void Discover(ShapeTableBuilder builder) { builder.Describe("AdminDashBoard") .OnDisplaying(async displaying => { // if (displaying.ShapeMetadata.DisplayType.Contains("Admin")) // { dynamic shape = displaying.Shape; var siteService = displaying.ServiceProvider.GetService <ISiteService>(); var site = await siteService.GetSiteSettingsAsync(); var admindashbaordsettings = site.As <AdminDashBoardSettings>(); var contentItemAlias = admindashbaordsettings?.ContentItemAlias; _contentAliasManager = displaying.ServiceProvider.GetService <IContentHandleManager>(); _contentManager = displaying.ServiceProvider.GetService <IContentManager>(); var adminDashBoardContentItem = await GetContentItemByAlias("slug:" + contentItemAlias); shape.AdminDashBoardContentItem = adminDashBoardContentItem; // if (adminDashBoardContentItem == null) // { // shape.Metadata.Alternates.Add("AdminContent_Empty"); // } // else // { // shape.AdminDashBoardContentItem = adminDashBoardContentItem; // //shape.AdminDashBoardContentItem(adminDashBoardContentItem); // // shape.Metadata.Alternates.Add("AdminContent_CustomAdmin"); // // // //IShape adminContentShape =await _contentItemDisplayManager.BuildDisplayAsync(adminDashBoardContentItem, null, // // "Detail"); // // //IShape adminContentShape = await _shapeFactory.CreateAsync("AdminContent_CustomAdmin", // // Arguments.From(new // // { // // // MenuName = "admin", // // ContentItem = adminDashBoardContentItem, // // })); // // // //set shape as a property befor rendering // // shape.CustomAdminDashBoardShape(adminContentShape); // } // } // e.g.AdminContent.Wrapper // shape?.Metadata.Wrappers.Add("AdminContent_Wrapper"); }); //builder.Describe("Content") // .OnDisplaying(displaying => // { // IShape shape = displaying.Shape; // // e.g.AdminContent.Wrapper // // shape?.Metadata.Wrappers.Add("AdminContent_Wrapper"); // // shape?.Metadata.Alternates.Add(); // }); //builder.Describe("Content_Edit") // .OnDisplaying(displaying => // { // IShape shape = displaying.Shape; // // e.g.AdminContent.Wrapper // //shape?.Metadata.Wrappers.Add("AdminContent_Wrapper"); // }); //builder.Describe("Content__Edit") // .OnDisplaying(displaying => // { // IShape shape = displaying.Shape; // // e.g.AdminContent.Wrapper // // shape?.Metadata.Wrappers.Add("AdminContent_Wrapper"); // }); }
public ContentLiquidTemplateEventHandler(IContentManager contentManager, IContentHandleManager contentHandleManager) { _contentManager = contentManager; _contentHandleManager = contentHandleManager; }