Esempio n. 1
0
        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);
                }
            });
        }
Esempio n. 2
0
        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);
            });
        }
Esempio n. 3
0
 public ThemeHelperService(
     ShellSettings shellSettings,
     IWorkContextAccessor workContextAccessor,
     IHomeAliasService homeAliasService,
     ILocalizationService localizationService)
 {
     _shellSettings       = shellSettings;
     _workContextAccessor = workContextAccessor;
     _homeAliasService    = homeAliasService;
     _localizationService = localizationService;
 }
Esempio n. 4
0
 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;
 }
Esempio n. 5
0
 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;
 }
Esempio n. 6
0
        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;
        }
Esempio n. 7
0
        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;
        }
Esempio n. 8
0
 public HomeAliasStep(IHomeAliasService homeAliasService, IContentManager contentManager)
 {
     _homeAliasService = homeAliasService;
     _contentManager   = contentManager;
 }
Esempio n. 9
0
 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;
 }
Esempio n. 11
0
 public HomeAliasStep(IHomeAliasService homeAliasService, IContentManager contentManager) {
     _homeAliasService = homeAliasService;
     _contentManager = contentManager;
 }
Esempio n. 12
0
 public HomeAliasStep(RecipeExecutionLogger logger, IContentManager contentManager, IHomeAliasService homeAliasService) : base(logger)
 {
     _contentManager   = contentManager;
     _homeAliasService = homeAliasService;
 }
Esempio n. 13
0
 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;
 }
Esempio n. 15
0
 public CurrentContentAccessor(IOrchardServices orchardServices, IHomeAliasService homeAliasService)
 {
     _orchardServices = orchardServices;
     _currentContentItemField.Loader(GetCurrentContentItem);
     _homeAliasService = homeAliasService;
 }