A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

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.
Inheritance
System.Object
CatalogLanguageSettingsHandler
Namespace: EPiServer.Commerce.Catalog
Assembly: EPiServer.Business.Commerce.dll
Version: 9.24.1
Syntax
public class CatalogLanguageSettingsHandler : ContentLanguageSettingsHandler

Constructors

CatalogLanguageSettingsHandler(IContentEvents, ILanguageBranchRepository, IContentProviderManager, ContentLanguageSettingRepository, ReferenceConverter, Func<IContentLoader>)

Declaration
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

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 override 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

true if language settings exists; otherwise, false.