Class EntryContentBaseExtensions
Extension methods for EntryContentBase.
Inheritance
Inherited Members
Namespace: EPiServer.Commerce.Catalog.ContentTypes
Assembly: EPiServer.Business.Commerce.dll
Version: 13.30.0Syntax
public static class EntryContentBaseExtensions
Methods
GetCategories(EntryContentBase)
Gets the categories to which the entry is linked.
Declaration
public static IEnumerable<ContentReference> GetCategories(this EntryContentBase entry)
Parameters
Type | Name | Description |
---|---|---|
EntryContentBase | entry | The entry. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<EPiServer.Core.ContentReference> | EPiServer.Core.ContentReferences of the parent categories. |
GetCategories(EntryContentBase, IRelationRepository)
Gets the categories to which the entry is linked.
Declaration
public static IEnumerable<ContentReference> GetCategories(this EntryContentBase entry, IRelationRepository relationRepository)
Parameters
Type | Name | Description |
---|---|---|
EntryContentBase | entry | The entry. |
IRelationRepository | relationRepository | The relation repository. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<EPiServer.Core.ContentReference> | EPiServer.Core.ContentReferences of the parent categories. |
GetParentBundles(EntryContentBase)
Gets the bundles containing an entry.
Declaration
public static IEnumerable<ContentReference> GetParentBundles(this EntryContentBase entry)
Parameters
Type | Name | Description |
---|---|---|
EntryContentBase | entry | The entry. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<EPiServer.Core.ContentReference> | EPiServer.Core.ContentReferences of the bundles containing the entry. |
GetParentBundles(EntryContentBase, IRelationRepository)
Gets the bundles containing an entry.
Declaration
public static IEnumerable<ContentReference> GetParentBundles(this EntryContentBase entry, IRelationRepository relationRepository)
Parameters
Type | Name | Description |
---|---|---|
EntryContentBase | entry | The entry. |
IRelationRepository | relationRepository | The relation repository. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<EPiServer.Core.ContentReference> | EPiServer.Core.ContentReferences of the bundles containing the entry. |
GetParentEntries(EntryContentBase)
Gets the parent entries (products, bundles and packages) containing an entry.
Declaration
public static IEnumerable<ContentReference> GetParentEntries(this EntryContentBase entry)
Parameters
Type | Name | Description |
---|---|---|
EntryContentBase | entry | The entry. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<EPiServer.Core.ContentReference> | EPiServer.Core.ContentReferences of the parent entries. |
GetParentEntries(EntryContentBase, IRelationRepository)
Gets the parent entries (products, bundles and packages) containing an entry.
Declaration
public static IEnumerable<ContentReference> GetParentEntries(this EntryContentBase entry, IRelationRepository relationRepository)
Parameters
Type | Name | Description |
---|---|---|
EntryContentBase | entry | The entry. |
IRelationRepository | relationRepository | The relation repository. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<EPiServer.Core.ContentReference> | EPiServer.Core.ContentReferences of the parent entries. |
GetParentPackages(EntryContentBase)
Gets the packages containing an entry.
Declaration
public static IEnumerable<ContentReference> GetParentPackages(this EntryContentBase entryContent)
Parameters
Type | Name | Description |
---|---|---|
EntryContentBase | entryContent | The entry. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<EPiServer.Core.ContentReference> | EPiServer.Core.ContentReferences of the packages containing the entry. |
GetParentPackages(EntryContentBase, IRelationRepository)
Gets the packages containing an entry.
Declaration
public static IEnumerable<ContentReference> GetParentPackages(this EntryContentBase entry, IRelationRepository relationRepository)
Parameters
Type | Name | Description |
---|---|---|
EntryContentBase | entry | The entry. |
IRelationRepository | relationRepository | The relation repository. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<EPiServer.Core.ContentReference> | EPiServer.Core.ContentReferences of the packages containing the entry. |
GetParentProducts(EntryContentBase)
Gets the parent products of an entry.
Declaration
public static IEnumerable<ContentReference> GetParentProducts(this EntryContentBase entry)
Parameters
Type | Name | Description |
---|---|---|
EntryContentBase | entry | The entry. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<EPiServer.Core.ContentReference> | EPiServer.Core.ContentReferences of the parent products. |
GetParentProducts(EntryContentBase, IRelationRepository)
Gets the parent products of an entry.
Declaration
public static IEnumerable<ContentReference> GetParentProducts(this EntryContentBase entry, IRelationRepository relationRepository)
Parameters
Type | Name | Description |
---|---|---|
EntryContentBase | entry | The entry. |
IRelationRepository | relationRepository | The relation repository. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<EPiServer.Core.ContentReference> | EPiServer.Core.ContentReferences of the parent products. |
GetRelatedEntries(EntryContentBase)
Gets the entries that have been associated with the current entry (e.g. accessories, cross-sell, up-sell).
Declaration
public static IEnumerable<ContentReference> GetRelatedEntries(this EntryContentBase entry)
Parameters
Type | Name | Description |
---|---|---|
EntryContentBase | entry | The entry to get related entries for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<EPiServer.Core.ContentReference> |
GetRelatedEntries(EntryContentBase, String)
Gets the entries that have been associated with the current entry (e.g. accessories, cross-sell, up-sell).
Declaration
public static IEnumerable<ContentReference> GetRelatedEntries(this EntryContentBase entry, string groupName)
Parameters
Type | Name | Description |
---|---|---|
EntryContentBase | entry | The entry to get related entries for. |
System.String | groupName | Association group name (see Group) to filter by, or null to not filter by group (include associations of any group). |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<EPiServer.Core.ContentReference> |
GetRelatedEntries(EntryContentBase, String, String)
Gets the entries that have been associated with the current entry (e.g. accessories, cross-sell, up-sell).
Declaration
public static IEnumerable<ContentReference> GetRelatedEntries(this EntryContentBase entry, string groupName, string typeId)
Parameters
Type | Name | Description |
---|---|---|
EntryContentBase | entry | The entry to get related entries for. |
System.String | groupName | Association group name (see Group) to filter by, or null to not filter by group (include associations of any group). |
System.String | typeId | Association type id (see Group) to filter by, or null to not filter by type (include associations of any type). |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<EPiServer.Core.ContentReference> |
GetRelatedEntries(EntryContentBase, String, String, IAssociationRepository)
Gets the entries that have been associated with the current entry (e.g. accessories, cross-sell, up-sell).
Declaration
public static IEnumerable<ContentReference> GetRelatedEntries(this EntryContentBase entry, string groupName, string typeId, IAssociationRepository associationRepository)
Parameters
Type | Name | Description |
---|---|---|
EntryContentBase | entry | The entry to get related entries for. |
System.String | groupName | Association group name (see Group) to filter by, or null to not filter by group (include associations of any group). |
System.String | typeId | Association type id (see Group) to filter by, or null to not filter by type (include associations of any type). |
IAssociationRepository | associationRepository | The association repository. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<EPiServer.Core.ContentReference> |
IsAvailableInCurrentMarket(EntryContentBase)
Determines whether the specific content is available in the current market
Declaration
public static bool IsAvailableInCurrentMarket(this EntryContentBase content)
Parameters
Type | Name | Description |
---|---|---|
EntryContentBase | content | The content. |
Returns
Type | Description |
---|---|
System.Boolean |
|
IsAvailableInCurrentMarket(EntryContentBase, ICurrentMarket)
Determines whether the specific content is available in the current market
Declaration
public static bool IsAvailableInCurrentMarket(this EntryContentBase content, ICurrentMarket currentMarketService)
Parameters
Type | Name | Description |
---|---|---|
EntryContentBase | content | The content. |
ICurrentMarket | currentMarketService | The current market service. |
Returns
Type | Description |
---|---|
System.Boolean |
|
IsAvailableInMarket(EntryContentBase, MarketId)
Determines whether the specific content is available in market
Declaration
public static bool IsAvailableInMarket(this EntryContentBase content, MarketId currentMarketId)
Parameters
Type | Name | Description |
---|---|---|
EntryContentBase | content | The content. |
MarketId | currentMarketId | The current market id. |
Returns
Type | Description |
---|---|
System.Boolean |
|