//TODO: Should prob implement these, requires a bit of work on the member service to do this, // also not sure if its necessary ? //public IEnumerable<IPublishedContent> GetMembersByTag(string tag, string tagGroup = null) //{ //} //public IEnumerable<IPublishedContent> GetMembersByTagGroup(string tagGroup) //{ //} /// <summary> /// Get every tag stored in the database (with optional group) /// </summary> public IEnumerable <TagModel> GetAllTags(string group = null) { //TODO: http://issues.umbraco.org/issue/U4-6899 if (_wrappedQuery != null) { return(_wrappedQuery.GetAllTags(group)); } return(Mapper.Map <IEnumerable <TagModel> >(_tagService.GetAllTags(group))); }
public IEnumerable <TagModel> GetTags(string tagGroup, string?culture, string?query = null) { if (culture == string.Empty) { culture = null; } var result = _tagQuery.GetAllTags(tagGroup, culture); if (!query.IsNullOrWhiteSpace()) { //TODO: add the query to TagQuery + the tag service, this is ugly but all we can do for now. //currently we are post filtering this :( but works for now result = result.Where(x => x?.Text?.InvariantContains(query !) ?? false); } return(result.WhereNotNull().OrderBy(x => x.Text)); }