public Cms.Menu.Menu Build(string name, object currentInput) { var breadCrumbs = _findBreadCrumbsFor.Get(currentInput).ToList(); var menuItems = _buildMenuTrees .Where(x => x.ForMenu == name && IsAvailableFor(x)) .OrderBy(x => x.Order) .SelectMany(x => x.Build(currentInput)) .Where(x => IsAvailableFor(x.Input)) .Select(x => new Cms.Menu.Menu.MenuItem(x.Title, x.IconName, x.Input, GetChildrenFor(x, currentInput, breadCrumbs), x.IsSelected(currentInput, breadCrumbs))) .ToList(); return(new Cms.Menu.Menu(name, menuItems)); }
public BreadCrumbsEndpointQueryResult Query(BreadCrumbsEndpointQueryInput input) { return(new BreadCrumbsEndpointQueryResult(_findBreadCrumbsFor.Get(input.CurrentInput).ToList())); }