-
No results found.
Try your search with a different keyword or use * as a wildcard.
MenuModelFactory.cs
using System.util;
using Microsoft.AspNetCore.Mvc.Rendering;
using Nop.Core;
using Nop.Core.Domain.Catalog;
using Nop.Core.Domain.Menus;
using Nop.Core.Http;
using Nop.Services;
using Nop.Services.Catalog;
using Nop.Services.Localization;
using Nop.Services.Menus;
using Nop.Services.Messages;
using Nop.Services.Topics;
using Nop.Services.Vendors;
using Nop.Web.Areas.Admin.Infrastructure.Mapper.Extensions;
using Nop.Web.Areas.Admin.Models.Menus;
using Nop.Web.Framework.Extensions;
using Nop.Web.Framework.Factories;
using Nop.Web.Framework.Models.Extensions;
namespace Nop.Web.Areas.Admin.Factories;
///
/// Represents the menu model factory implementation
///
public partial class MenuModelFactory : IMenuModelFactory
{
#region Fields
protected readonly CatalogSettings _catalogSettings;
protected readonly IBaseAdminModelFactory _baseAdminModelFactory;
protected readonly ICategoryService _categoryService;
protected readonly ILocalizationService _localizationService;
protected readonly ILocalizedModelFactory _localizedModelFactory;
protected readonly IManufacturerService _manufacturerService;
protected readonly IMenuService _menuService;
protected readonly INotificationService _notificationService;
protected readonly IProductService _productService;
protected readonly IStoreMappingSupportedModelFactory _storeMappingSupportedModelFactory;
protected readonly ITopicService _topicService;
protected readonly IVendorService _vendorService;
protected readonly MenuSettings _menuSettings;
#endregion
#region Ctor
public MenuModelFactory(
CatalogSettings catalogSettings,
IBaseAdminModelFactory baseAdminModelFactory,
ICategoryService categoryService,
ILocalizationService localizationService,
ILocalizedModelFactory localizedModelFactory,
IManufacturerService manufacturerService,
IMenuService menuService,
INotificationService notificationService,
IProductService productService,
IStoreMappingSupportedModelFactory storeMappingSupportedModelFactory,
ITopicService topicService,
IVendorService vendorService,
MenuSettings menuSettings)
{
_catalogSettings = catalogSettings;
_baseAdminModelFactory = baseAdminModelFactory;
_categoryService = categoryService;
_localizationService = localizationService;
_localizedModelFactory = localizedModelFactory;
_manufacturerService = manufacturerService;
_menuService = menuService;
_notificationService = notificationService;
_productService = productService;
_storeMappingSupportedModelFactory = storeMappingSupportedModelFactory;
_topicService = topicService;
_vendorService = vendorService;
_menuSettings = menuSettings;
}
#endregion
#region Utilities
///
/// Get breadcrumb for menu item
///
/// Menu item
/// All menu items
///
/// A task that represents the asynchronous operation
/// The task result contains menu item breadcrumb
///
protected virtual async Task GetMenuItemBreadcrumbAsync(MenuItem item, IEnumerable