public CultureService(IWorkContextAccessor workContextAccessor, IOrchardServices orchardServices, ICultureManager cultureManager, ILocalizationService localizationService)
 {
     _orchardServices = orchardServices;
     _cultureManager = cultureManager;
     //_workContextAccessor = workContextAccessor;
     _localizationService = localizationService;
 }
 public ShadowCultureManager(IRepository<CultureRecord> cultureRepository, 
                              IEnumerable<ICultureSelector> cultureSelectors, 
                              ISignals signals, 
                              IWorkContextAccessor workContextAccessor) {
     _workContextAccessor = workContextAccessor;
     _underlyingCultureManager = new DefaultCultureManager(cultureRepository, cultureSelectors, signals, workContextAccessor);
 }
Ejemplo n.º 3
0
 public LocalizableHomeController(IOrchardServices orchardServices, ICultureManager cultureManager, ILocalizableContentService localizableContentService, IAliasService aliasService) {
     _orchardServices = orchardServices;
     _cultureManager = cultureManager;
     _localizableContentService = localizableContentService;
     _aliasService = aliasService;
     Logger = NullLogger.Instance;
 }
 public LocalizableMainMenuNavigationProvider(IContentManager contentManager, ICultureManager cultureManager,
     IWorkContextAccessor workContextAccessor, ILocalizationService localizationService)
 {
     _contentManager = contentManager;
     _cultureManager = cultureManager;
     _workContextAccessor = workContextAccessor;
     _localizationService = localizationService;
 }
 public AdminCultureSelectorFactory(
     IWorkContextAccessor workContextAccessor, 
     IShapeFactory shapeFactory,
     ICultureManager cultureManager) {
     _cultureManager = cultureManager;
     _workContext = workContextAccessor.GetContext();
     Shape = shapeFactory;
 }
 public LocalizationBucket(ICultureManager cultureManager, IWorkContextAccessor workContextAccessor)
 {
     var currentCultureName = cultureManager.GetCurrentCulture(workContextAccessor.GetContext().HttpContext);
     var defaultCultureName = cultureManager.GetSiteCulture();
     CurrentCulture = cultureManager.GetCultureByName(currentCultureName);
     DefaultCulture = cultureManager.GetCultureByName(defaultCultureName);
     IsCurrentCultureDefault = CurrentCulture != null && CurrentCulture.Id == DefaultCulture.Id;
 }
Ejemplo n.º 7
0
 public CategoryService(
     IOrchardServices services,
     IContentManager contentManager,
     ICultureManager cultureManager) {
     Services = services;
     _contentManager = contentManager;
     _cultureManager = cultureManager;
 }
 public LocalizedMenuFilter(
     ICultureManager cultureManager, 
     IWorkContextAccessor workContextAccessor,
     ISiteService siteService
  ) {
     _cultureManager = cultureManager;
     _workContextAccessor = workContextAccessor;
     _siteService = siteService;
 }
Ejemplo n.º 9
0
        public ResourceFormController(IContentManager contentManager, ICultureManager cultureManager, IEmailService emailService, IOrchardServices services, IIndexingTaskManager indexingTasks)
        {
            this.contentManager = contentManager;
            this.cultureManager = cultureManager;
            this.emailManager = emailService;
            orchardServices = services;
            _indexingTasks = indexingTasks;

            Logger = NullLogger.Instance;
        }
 public LocalizableHomeController(IEnumerable<IHomePageProvider> homePageProviders, IOrchardServices orchardServices, IContentManager contentManager, ICultureManager cultureManager, IWorkContextAccessor workContextAccessor, ILocalizableContentService localizableContentService)
 {
     _homePageProviders = homePageProviders;
     _orchardServices = orchardServices;
     _contentManager = contentManager;
     _cultureManager = cultureManager;
     _workContextAccessor = workContextAccessor;
     _localizableContentService = localizableContentService;
     Logger = NullLogger.Instance;
 }
Ejemplo n.º 11
0
 public AdminController(
     ISiteService siteService,
     IOrchardServices services,
     ICultureManager cultureManager)
 {
     _siteService = siteService;
     _cultureManager = cultureManager;
     Services = services;
     T = NullLocalizer.Instance;
 }
 public LocalizationService(IWorkContextAccessor wca, ICultureManager cultureManager,
     ICacheManager cacheManager, ISignals signals, IOrchardServices services, ShellSettings shellSettings)
 {
     _shellSettings = shellSettings;
       _services = services;
       _signals = signals;
       T = NullLocalizer.Instance;
       _wca = wca;
       _cultureManager = cultureManager;
       _cacheManager = cacheManager;
 }
Ejemplo n.º 13
0
 public EntryService(
     IOrchardServices services,
     IContentManager contentManager,
     IPublishingTaskManager publishingTaskManager,
     ICultureManager cultureManager)
 {
     Services = services;
     _contentManager = contentManager;
     _publishingTaskManager = publishingTaskManager;
     _cultureManager = cultureManager;
 }
Ejemplo n.º 14
0
        public ProductAdminController(IProductService productService, IShapeFactory shapeFactory, ISiteService siteService, IContentManager contentManager, IContentDefinitionManager contentDefinitionManager, ICultureManager cultureManager, ICultureFilter cultureFilter, IOrchardServices services) {
            Shape = shapeFactory;
            _productService = productService;
            _siteService = siteService;
            _contentManager = contentManager;
            _contentDefinitionManager = contentDefinitionManager;
            _cultureManager = cultureManager;
            _cultureFilter = cultureFilter;

            Services = services;
        }
Ejemplo n.º 15
0
 public ContentDefinitionEventHandler(
     IContentManager contentManager,
     Lazy<IAutorouteService> autorouteService,
     IOrchardServices orchardServices,
     IContentDefinitionManager contentDefinitionManager,
     ICultureManager cultureManager) {
     _cultureManager = cultureManager;
     _contentDefinitionManager = contentDefinitionManager;
     _orchardServices = orchardServices;
     _autorouteService = autorouteService;
     _contentManager = contentManager;
 }
 public LocalizableItemController(
     IContentManager contentManager, 
     IContainersPathConstraint containersPathConstraint, 
     IShapeFactory shapeFactory,
     ISiteService siteService,
     ICultureManager cultureManager)
 {
     _contentManager = contentManager;
     _containersPathConstraint = containersPathConstraint;
     _siteService = siteService;
     _cultureManager = cultureManager;
     Shape = shapeFactory;
 }
Ejemplo n.º 17
0
 public CultureBodyPartDriver(
     ILocalizationService locService,
     IOrchardServices services, 
     ICultureManager cutureManager,
     RequestContext requestContext,
     IEnumerable<IHtmlFilter> htmlFilters)
     : base(services, htmlFilters, requestContext)
 {
     _locService = locService;
     _services = services;
     _cutureManager = cutureManager;
     _htmlFilters = htmlFilters;
 }
Ejemplo n.º 18
0
        public LocalizationPartHandler(IRepository<LocalizationPartRecord> localizedRepository, ICultureManager cultureManager, IContentManager contentManager) {
            _cultureManager = cultureManager;
            _contentManager = contentManager;
            T = NullLocalizer.Instance;

            Filters.Add(StorageFilter.For(localizedRepository));

            OnActivated<LocalizationPart>(PropertySetHandlers);

            OnLoading<LocalizationPart>((context, part) => LazyLoadHandlers(part));
            OnVersioning<LocalizationPart>((context, part, versionedPart) => LazyLoadHandlers(versionedPart));

            OnIndexed<LocalizationPart>((context, localized) => context.DocumentIndex
                .Add("culture", CultureInfo.GetCultureInfo(localized.Culture != null ? localized.Culture.Culture : _cultureManager.GetSiteCulture()).LCID).Store()
                );
        }
 public LocalizedTagsService(IContentManager contentManager,
                             IRepository<ContentTagRecord> contentTagRepository, 
                             IRepository<LocalizationPartRecord> localizationPartRepository, 
                             ICultureManager cultureManager,
                             IWorkContextAccessor workContextAccessor,
                             ICacheManager cacheManager,
                             ISignals signals) 
 {
     _contentManager = contentManager;
     _contentTagRepository = contentTagRepository;
     _localizationPartRepository = localizationPartRepository;
     _cultureManager = cultureManager;
     _workContextAccessor = workContextAccessor;
     _cacheManager = cacheManager;
     _signals = signals;
 }
Ejemplo n.º 20
0
 public AutorouteService(
     IAliasService aliasService,
     ITokenizer tokenizer,
     IContentDefinitionManager contentDefinitionManager,
     IContentManager contentManager,
     IRouteEvents routeEvents,
     ICultureManager cultureManager,
     IHttpContextAccessor httpContextAccessor)
 {
     _aliasService = aliasService;
     _tokenizer = tokenizer;
     _contentDefinitionManager = contentDefinitionManager;
     _contentManager = contentManager;
     _routeEvents = routeEvents;
     _cultureManager = cultureManager;
     _httpContextAccessor = httpContextAccessor;
 }
Ejemplo n.º 21
0
        //private IRepository<EmployeePartRecord> _employeeRepository;

        public ADUpdaterService(IContentManager contentManager,
            IOrchardServices orchardServices,
            ICultureManager cultureManager,
            ICacheManager cacheManager,
            ILdapServiceFactory ldapServiceFactory,
            IMediaLibraryService mediaLibraryService,
            IStorageProvider storageProvider)
        {
            _contentManager = contentManager;
            this.orchardServices = orchardServices;
            originalMembershipService = new Lazy<IMembershipService>(() =>
                this.orchardServices.WorkContext.Resolve<IEnumerable<IMembershipService>>().Single(x => x is MembershipService));
            this.cultureManager = cultureManager;
            this.cacheManager = cacheManager;
            this.ldapServiceFactory = ldapServiceFactory;
            this.mediaLibraryService = mediaLibraryService;
            this.storageProvider = storageProvider;

            Logger = NullLogger.Instance;
            T = NullLocalizer.Instance;
        }
Ejemplo n.º 22
0
 public void Init() {
     var builder = new ContainerBuilder();
     _stubWorkContext = new StubWorkContext();
     builder.RegisterType<DefaultShapeTableManager>().As<IShapeTableManager>();
     builder.RegisterType<DefaultShapeFactory>().As<IShapeFactory>();
     builder.RegisterInstance(new Mock<IContentDefinitionManager>().Object);
     builder.RegisterInstance(new Mock<IAuthorizer>().Object);
     builder.RegisterInstance(new Mock<INotifier>().Object);
     builder.RegisterInstance(new Mock<IContentDisplay>().Object);
     builder.RegisterInstance(_stubWorkContext);
     builder.RegisterInstance(new StubWorkContextAccessor(_stubWorkContext)).As<IWorkContextAccessor>();
     builder.RegisterType<DefaultContentManager>().As<IContentManager>();
     builder.RegisterType<DefaultContentManagerSession>().As<IContentManagerSession>();
     builder.RegisterType<OrchardServices>().As<IOrchardServices>();
     builder.RegisterType<DefaultCultureManager>().As<ICultureManager>();
     builder.RegisterType<Signals>().As<ISignals>();
     builder.RegisterType<StubCacheManager>().As<ICacheManager>();
     builder.RegisterGeneric(typeof(Repository<>)).As(typeof(IRepository<>));
     _session = _sessionFactory.OpenSession();
     builder.RegisterInstance(new TestTransactionManager(_session)).As<ITransactionManager>();
     _container = builder.Build();
     _cultureManager = _container.Resolve<ICultureManager>();
 }
Ejemplo n.º 23
0
 public LocalizableContentService(ILocalizationService localizationService, ICultureManager cultureManager, IContentManager contentManager) {
     _localizationService = localizationService;
     _cultureManager = cultureManager;
     _contentManager = contentManager;
 }
 public CultureTokensProvider(ICultureManager cultureManager)
 {
     T = NullLocalizer.Instance;
     _cultureManager = cultureManager;
 }
 public LocalizableMainMenuNavigationFilter(ICultureManager cultureManager, IWorkContextAccessor workContextAccessor) {
     _cultureManager = cultureManager;
     _workContextAccessor = workContextAccessor;
 }
 public LocalizationCultureFilter(ICultureManager cultureManager) {
     _cultureManager = cultureManager;
 }
 public CultureCommands(ICultureManager cultureManager, IOrchardServices orchardServices) {
     _cultureManager = cultureManager;
     _orchardServices = orchardServices;
 }
Ejemplo n.º 28
0
		public PostsController(IPostsManager postsManager, ICultureManager cultureManager)
		{
			_postsManager = postsManager;
			_cultureManager = cultureManager;
		}
		public AbusesController(ICommentsManager commentsManager, ICultureManager cultureManager)
		{
			_commentsManager = commentsManager;
			_cultureManager = cultureManager;
		}
Ejemplo n.º 30
0
 public AutorouteSettingsHooks(INotifier notifier, ICultureManager cultureManager) {
     _notifier = notifier;
     _cultureManager = cultureManager;
 }