Class EntryContentBaseExtensions
Extension methods for Entry
Inheritance
Namespace: EPiServer.Commerce.Catalog.ContentTypes
Assembly: EPiServer.Business.Commerce.dll
Version: 14.26.0Syntax
public static class EntryContentBaseExtensions : Object
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 |
---|---|---|
Entry |
entry | The entry. |
Returns
Type | Description |
---|---|
System. |
EPi |
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 |
---|---|---|
Entry |
entry | The entry. |
IRelation |
relationRepository | The relation repository. |
Returns
Type | Description |
---|---|
System. |
EPi |
GetParentBundles(EntryContentBase)
Gets the bundles containing an entry.
Declaration
public static IEnumerable<ContentReference> GetParentBundles(this EntryContentBase entry)
Parameters
Type | Name | Description |
---|---|---|
Entry |
entry | The entry. |
Returns
Type | Description |
---|---|
System. |
EPi |
GetParentBundles(EntryContentBase, IRelationRepository)
Gets the bundles containing an entry.
Declaration
public static IEnumerable<ContentReference> GetParentBundles(this EntryContentBase entry, IRelationRepository relationRepository)
Parameters
Type | Name | Description |
---|---|---|
Entry |
entry | The entry. |
IRelation |
relationRepository | The relation repository. |
Returns
Type | Description |
---|---|
System. |
EPi |
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 |
---|---|---|
Entry |
entry | The entry. |
Returns
Type | Description |
---|---|
System. |
EPi |
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 |
---|---|---|
Entry |
entry | The entry. |
IRelation |
relationRepository | The relation repository. |
Returns
Type | Description |
---|---|
System. |
EPi |
GetParentPackages(EntryContentBase)
Gets the packages containing an entry.
Declaration
public static IEnumerable<ContentReference> GetParentPackages(this EntryContentBase entryContent)
Parameters
Type | Name | Description |
---|---|---|
Entry |
entryContent | The entry. |
Returns
Type | Description |
---|---|
System. |
EPi |
GetParentPackages(EntryContentBase, IRelationRepository)
Gets the packages containing an entry.
Declaration
public static IEnumerable<ContentReference> GetParentPackages(this EntryContentBase entry, IRelationRepository relationRepository)
Parameters
Type | Name | Description |
---|---|---|
Entry |
entry | The entry. |
IRelation |
relationRepository | The relation repository. |
Returns
Type | Description |
---|---|
System. |
EPi |
GetParentProducts(EntryContentBase)
Gets the parent products of an entry.
Declaration
public static IEnumerable<ContentReference> GetParentProducts(this EntryContentBase entry)
Parameters
Type | Name | Description |
---|---|---|
Entry |
entry | The entry. |
Returns
Type | Description |
---|---|
System. |
EPi |
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 |
---|---|---|
Entry |
entry | The entry. |
IRelation |
relationRepository | The relation repository. |
Returns
Type | Description |
---|---|
System. |
EPi |
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 |
---|---|---|
Entry |
entry | The entry to get related entries for. |
Returns
Type | Description |
---|---|
System. |
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 |
---|---|---|
Entry |
entry | The entry to get related entries for. |
System. |
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. |
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 |
---|---|---|
Entry |
entry | The entry to get related entries for. |
System. |
groupName | Association group name (see Group) to filter by, or null to not filter by group (include associations of any group). |
System. |
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. |
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 |
---|---|---|
Entry |
entry | The entry to get related entries for. |
System. |
groupName | Association group name (see Group) to filter by, or null to not filter by group (include associations of any group). |
System. |
typeId | Association type id (see Group) to filter by, or null to not filter by type (include associations of any type). |
IAssociation |
associationRepository | The association repository. |
Returns
Type | Description |
---|---|
System. |
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 |
---|---|---|
Entry |
content | The content. |
Returns
Type | Description |
---|---|
System. |
|
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 |
---|---|---|
Entry |
content | The content. |
ICurrent |
currentMarketService | The current market service. |
Returns
Type | Description |
---|---|
System. |
|
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 |
---|---|---|
Entry |
content | The content. |
Market |
currentMarketId | The current market id. |
Returns
Type | Description |
---|---|
System. |
|