Rock.Model.CategoryService.GetNavigationItems C# (CSharp) Method

GetNavigationItems() public method

Gets all of the categories that were selected and optionally all the child categories of the selected categories
public GetNavigationItems ( int entityTypeId, List selectedCategoryGuids, bool includeAllChildren, Person currentPerson ) : List
entityTypeId int The entity type identifier.
selectedCategoryGuids List The selected category guids.
includeAllChildren bool if set to true will include all the child categories of any selected category.
currentPerson Person The current person.
return List
        public List<CategoryNavigationItem> GetNavigationItems( int? entityTypeId, List<Guid> selectedCategoryGuids, bool includeAllChildren, Person currentPerson )
        {
            var allCategories = GetByEntityTypeId( entityTypeId ).ToList();
            return GetNavigationChildren( null, allCategories, selectedCategoryGuids, selectedCategoryGuids.Any(), includeAllChildren, currentPerson );
        }