public AutoroutePartHandler( IRepository <AutoroutePartRecord> autoroutePartRepository, Lazy <IAutorouteService> autorouteService, IOrchardServices orchardServices, IHomeAliasService homeAliasService) { Filters.Add(StorageFilter.For(autoroutePartRepository)); _autorouteService = autorouteService; _orchardServices = orchardServices; _homeAliasService = homeAliasService; OnUpdated <AutoroutePart>((ctx, part) => CreateAlias(part)); OnCreated <AutoroutePart>((ctx, part) => { // non-draftable items if (part.ContentItem.VersionRecord == null) { PublishAlias(part); } }); OnPublished <AutoroutePart>((ctx, part) => PublishAlias(part)); // Remove alias if removed or unpublished OnRemoved <AutoroutePart>((ctx, part) => RemoveAlias(part)); OnUnpublished <AutoroutePart>((ctx, part) => RemoveAlias(part)); // Register alias as identity OnGetContentItemMetadata <AutoroutePart>((ctx, part) => { if (part.DisplayAlias != null) { ctx.Metadata.Identity.Add("alias", part.DisplayAlias); } }); }
public AutoroutePartHandler( IRepository<AutoroutePartRecord> autoroutePartRepository, Lazy<IAutorouteService> autorouteService, IOrchardServices orchardServices, IHomeAliasService homeAliasService) { Filters.Add(StorageFilter.For(autoroutePartRepository)); _autorouteService = autorouteService; _orchardServices = orchardServices; _homeAliasService = homeAliasService; OnUpdated<AutoroutePart>((ctx, part) => CreateAlias(part)); OnCreated<AutoroutePart>((ctx, part) => { // non-draftable items if (part.ContentItem.VersionRecord == null) { PublishAlias(part); } }); OnPublished<AutoroutePart>((ctx, part) => PublishAlias(part)); // Remove alias if removed or unpublished OnRemoving<AutoroutePart>((ctx, part) => RemoveAlias(part)); OnUnpublished<AutoroutePart>((ctx, part) => RemoveAlias(part)); // Register alias as identity OnGetContentItemMetadata<AutoroutePart>((ctx, part) => { if (part.DisplayAlias != null) ctx.Metadata.Identity.Add("alias", part.DisplayAlias); }); }
public ThemeHelperService( ShellSettings shellSettings, IWorkContextAccessor workContextAccessor, IHomeAliasService homeAliasService, ILocalizationService localizationService) { _shellSettings = shellSettings; _workContextAccessor = workContextAccessor; _homeAliasService = homeAliasService; _localizationService = localizationService; }
public ContentTreeService( IContentManager contentManager, ISiteService siteService, IShapeFactory shapeFactory, IEnumerable <ITreePermissionProvider> treePermissionProviders, IHomeAliasService homeAliasService, IAliasService aliasService) { _contentManager = contentManager; _siteSettings = siteService.GetSiteSettings(); _treePermissionProviders = treePermissionProviders; _shapeFactory = shapeFactory; _homeAliasService = homeAliasService; _aliasService = aliasService; }
public PageCommands( IContentManager contentManager, IMembershipService membershipService, IAuthenticationService authenticationService, ISiteService siteService, IMenuService menuService, INavigationManager navigationManager, IHomeAliasService homeAliasService) { _contentManager = contentManager; _membershipService = membershipService; _siteService = siteService; _menuService = menuService; _navigationManager = navigationManager; _homeAliasService = homeAliasService; _authenticationService = authenticationService; }
public AutoroutePartDriver( IAutorouteService autorouteService, INotifier notifier, IHomeAliasService homeAliasService, IAliasService aliasService, IAuthorizer authorizer, ICultureManager cultureManager, IContentManager contentManager, IHttpContextAccessor httpContextAccessor) { _aliasService = aliasService; _contentManager = contentManager; _autorouteService = autorouteService; _notifier = notifier; _homeAliasService = homeAliasService; _cultureManager = cultureManager; _httpContextAccessor = httpContextAccessor; T = NullLocalizer.Instance; }
public HomeAliasStep(IHomeAliasService homeAliasService, IContentManager contentManager) { _homeAliasService = homeAliasService; _contentManager = contentManager; }
public HomeAliasStep(RecipeExecutionLogger logger, IContentManager contentManager, IHomeAliasService homeAliasService) : base(logger) { _contentManager = contentManager; _homeAliasService = homeAliasService; }
public SlugTokens(ISlugService slugService, IHomeAliasService homeAliasService) { T = NullLocalizer.Instance; _slugService = slugService; _homeAliasService = homeAliasService; }
public CurrentContentAccessor(IOrchardServices orchardServices, IHomeAliasService homeAliasService) { _orchardServices = orchardServices; _currentContentItemField.Loader(GetCurrentContentItem); _homeAliasService = homeAliasService; }