C# Class Nop.Services.Catalog.CategoryService

Category service
Inheritance: ICategoryService
Afficher le fichier Open project: emilianionascu/NopCommerce

Méthodes publiques

Méthode Description
CategoryService ( ICacheManager cacheManager, IRepository categoryRepository, IRepository productCategoryRepository, IRepository productRepository, IRepository aclRepository, IWorkContext workContext, IEventPublisher eventPublisher ) : System

Ctor

DeleteCategory ( Category category ) : void

Delete category

DeleteProductCategory ( Nop.Core.Domain.Catalog.ProductCategory productCategory ) : void

Deletes a product category mapping

GetAllCategories ( string categoryName = "", int pageIndex, int pageSize = int.MaxValue, bool showHidden = false ) : IPagedList

Gets all categories

GetAllCategoriesByParentCategoryId ( int parentCategoryId, bool showHidden = false ) : IList

Gets all categories filtered by parent category identifier

GetAllCategoriesDisplayedOnHomePage ( ) : IList

Gets all categories displayed on the home page

GetCategoryById ( int categoryId ) : Category

Gets a category

GetProductCategoriesByCategoryId ( int categoryId, int pageIndex, int pageSize, bool showHidden = false ) : IPagedList

Gets product category mapping collection

GetProductCategoriesByProductId ( int productId, bool showHidden = false ) : IList

Gets a product category mapping collection

GetProductCategoryById ( int productCategoryId ) : Nop.Core.Domain.Catalog.ProductCategory

Gets a product category mapping

GetTotalNumberOfFeaturedProducts ( int categoryId ) : int

Get a total number of featured products by category identifier

InsertCategory ( Category category ) : void

Inserts category

InsertProductCategory ( Nop.Core.Domain.Catalog.ProductCategory productCategory ) : void

Inserts a product category mapping

UpdateCategory ( Category category ) : void

Updates the category

UpdateHasDiscountsApplied ( Category category ) : void

Update HasDiscountsApplied property (used for performance optimization)

UpdateProductCategory ( ProductCategory productCategory ) : void

Updates the product category mapping

Method Details

CategoryService() public méthode

Ctor
public CategoryService ( ICacheManager cacheManager, IRepository categoryRepository, IRepository productCategoryRepository, IRepository productRepository, IRepository aclRepository, IWorkContext workContext, IEventPublisher eventPublisher ) : System
cacheManager ICacheManager Cache manager
categoryRepository IRepository Category repository
productCategoryRepository IRepository ProductCategory repository
productRepository IRepository Product repository
aclRepository IRepository ACL record repository
workContext IWorkContext Work context
eventPublisher IEventPublisher Event publisher
Résultat System

DeleteCategory() public méthode

Delete category
public DeleteCategory ( Category category ) : void
category Nop.Core.Domain.Catalog.Category Category
Résultat void

DeleteProductCategory() public méthode

Deletes a product category mapping
public DeleteProductCategory ( Nop.Core.Domain.Catalog.ProductCategory productCategory ) : void
productCategory Nop.Core.Domain.Catalog.ProductCategory Product category
Résultat void

GetAllCategories() public méthode

Gets all categories
public GetAllCategories ( string categoryName = "", int pageIndex, int pageSize = int.MaxValue, bool showHidden = false ) : IPagedList
categoryName string Category name
pageIndex int Page index
pageSize int Page size
showHidden bool A value indicating whether to show hidden records
Résultat IPagedList

GetAllCategoriesByParentCategoryId() public méthode

Gets all categories filtered by parent category identifier
public GetAllCategoriesByParentCategoryId ( int parentCategoryId, bool showHidden = false ) : IList
parentCategoryId int Parent category identifier
showHidden bool A value indicating whether to show hidden records
Résultat IList

GetAllCategoriesDisplayedOnHomePage() public méthode

Gets all categories displayed on the home page
public GetAllCategoriesDisplayedOnHomePage ( ) : IList
Résultat IList

GetCategoryById() public méthode

Gets a category
public GetCategoryById ( int categoryId ) : Category
categoryId int Category identifier
Résultat Nop.Core.Domain.Catalog.Category

GetProductCategoriesByCategoryId() public méthode

Gets product category mapping collection
public GetProductCategoriesByCategoryId ( int categoryId, int pageIndex, int pageSize, bool showHidden = false ) : IPagedList
categoryId int Category identifier
pageIndex int Page index
pageSize int Page size
showHidden bool A value indicating whether to show hidden records
Résultat IPagedList

GetProductCategoriesByProductId() public méthode

Gets a product category mapping collection
public GetProductCategoriesByProductId ( int productId, bool showHidden = false ) : IList
productId int Product identifier
showHidden bool A value indicating whether to show hidden records
Résultat IList

GetProductCategoryById() public méthode

Gets a product category mapping
public GetProductCategoryById ( int productCategoryId ) : Nop.Core.Domain.Catalog.ProductCategory
productCategoryId int Product category mapping identifier
Résultat Nop.Core.Domain.Catalog.ProductCategory

GetTotalNumberOfFeaturedProducts() public méthode

Get a total number of featured products by category identifier
public GetTotalNumberOfFeaturedProducts ( int categoryId ) : int
categoryId int Category identifier
Résultat int

InsertCategory() public méthode

Inserts category
public InsertCategory ( Category category ) : void
category Nop.Core.Domain.Catalog.Category Category
Résultat void

InsertProductCategory() public méthode

Inserts a product category mapping
public InsertProductCategory ( Nop.Core.Domain.Catalog.ProductCategory productCategory ) : void
productCategory Nop.Core.Domain.Catalog.ProductCategory >Product category mapping
Résultat void

UpdateCategory() public méthode

Updates the category
public UpdateCategory ( Category category ) : void
category Category Category
Résultat void

UpdateHasDiscountsApplied() public méthode

Update HasDiscountsApplied property (used for performance optimization)
public UpdateHasDiscountsApplied ( Category category ) : void
category Category Category
Résultat void

UpdateProductCategory() public méthode

Updates the product category mapping
public UpdateProductCategory ( ProductCategory productCategory ) : void
productCategory ProductCategory >Product category mapping
Résultat void