Class CatalogLanguageSettingsHandler
Extends the default language settings handler with logic for catalog content. The logic is as follows:
- No replacement languages
- No fallback languages
- All languages that are enabled for a catalog are active, the others are not.
Namespace: EPiServer.Commerce.Catalog
Assembly: EPiServer.Business.Commerce.dll
Version: 10.8.0Syntax
[Obsolete("This class is superseded by an internal implementation of IContentLanguageSettingsResolver. Will remain at least until October 2017.")]
public class CatalogLanguageSettingsHandler : DefaultContentLanguageSettingsHandler
Constructors
CatalogLanguageSettingsHandler(IContentEvents, ILanguageBranchRepository, IContentProviderManager, ContentLanguageSettingRepository, ReferenceConverter, Func<IContentLoader>)
Declaration
[Obsolete("Use overload with ServiceAccessor for IContentRepository. Will remain at least until September 2017.")]
public CatalogLanguageSettingsHandler(IContentEvents contentEvents, ILanguageBranchRepository languageBranchRepository, IContentProviderManager contentProviderManager, ContentLanguageSettingRepository settingsRepository, ReferenceConverter referenceConverter, Func<IContentLoader> contentLoaderAccessor)
Parameters
Type | Name | Description |
---|---|---|
EPiServer.Core.IContentEvents | contentEvents | |
EPiServer.DataAbstraction.ILanguageBranchRepository | languageBranchRepository | |
EPiServer.Core.IContentProviderManager | contentProviderManager | |
EPiServer.DataAbstraction.ContentLanguageSettingRepository | settingsRepository | |
ReferenceConverter | referenceConverter | |
System.Func<EPiServer.IContentLoader> | contentLoaderAccessor |
CatalogLanguageSettingsHandler(ServiceAccessor<IContentRepository>, ILanguageBranchRepository, IContentLanguageSettingsResolver, ReferenceConverter)
Declaration
public CatalogLanguageSettingsHandler(ServiceAccessor<IContentRepository> contentRepositoryAccessor, ILanguageBranchRepository languageBranchRepository, IContentLanguageSettingsResolver contentLanguageSettingsResolver, ReferenceConverter referenceConverter)
Parameters
Type | Name | Description |
---|---|---|
EPiServer.ServiceLocation.ServiceAccessor<EPiServer.IContentRepository> | contentRepositoryAccessor | |
EPiServer.DataAbstraction.ILanguageBranchRepository | languageBranchRepository | |
EPiServer.Core.IContentLanguageSettingsResolver | contentLanguageSettingsResolver | |
ReferenceConverter | referenceConverter |
Properties
ContentLoader
Gets the content loader.
Declaration
protected IContentLoader ContentLoader { get; }
Property Value
Type | Description |
---|---|
EPiServer.IContentLoader | The content loader. |
Methods
Get(ContentReference)
Gets the settings for all languages for the specified content link.
Declaration
public override IEnumerable<ContentLanguageSetting> Get(ContentReference contentLink)
Parameters
Type | Name | Description |
---|---|---|
EPiServer.Core.ContentReference | contentLink | The content link. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<EPiServer.DataAbstraction.ContentLanguageSetting> | An IEnumerable{ContentLanguageSetting} with the language settings for the given content. |
GetClosestSetting(ContentReference)
Gets the closest ancestor that has language settings.
Declaration
public virtual ContentReference GetClosestSetting(ContentReference contentLink)
Parameters
Type | Name | Description |
---|---|---|
EPiServer.Core.ContentReference | contentLink | The content link. |
Returns
Type | Description |
---|---|
EPiServer.Core.ContentReference | The closest ancestor that has language settings. |
IsSettingsDefined(ContentReference)
Determines whether there exists language settings for the given content.
Declaration
public override bool IsSettingsDefined(ContentReference contentLink)
Parameters
Type | Name | Description |
---|---|---|
EPiServer.Core.ContentReference | contentLink | The content link. |
Returns
Type | Description |
---|---|
System.Boolean |
|