Fixes: U4-4420 TagQuery / TagService missing method to get content with tag.

This commit is contained in:
Shannon
2014-05-07 14:27:10 +10:00
parent cfd21bc924
commit a6cd2b9e18
7 changed files with 256 additions and 31 deletions

View File

@@ -38,7 +38,8 @@ namespace Umbraco.Web
/// <returns></returns>
public IEnumerable<IPublishedContent> GetContentByTag(string tag, string tagGroup = null)
{
var ids = _tagService.GetContentIdsByTag(tag, tagGroup);
var ids = _tagService.GetTaggedContentByTag(tag, tagGroup)
.Select(x => x.EntityId);
return _contentQuery.TypedContent(ids)
.Where(x => x != null);
}
@@ -50,7 +51,8 @@ namespace Umbraco.Web
/// <returns></returns>
public IEnumerable<IPublishedContent> GetContentByTagGroup(string tagGroup)
{
var ids = _tagService.GetContentIdsByTagGroup(tagGroup);
var ids = _tagService.GetTaggedContentByTagGroup(tagGroup)
.Select(x => x.EntityId);
return _contentQuery.TypedContent(ids)
.Where(x => x != null);
}
@@ -63,7 +65,8 @@ namespace Umbraco.Web
/// <returns></returns>
public IEnumerable<IPublishedContent> GetMediaByTag(string tag, string tagGroup = null)
{
var ids = _tagService.GetMediaIdsByTag(tag, tagGroup);
var ids = _tagService.GetTaggedMediaByTag(tag, tagGroup)
.Select(x => x.EntityId);
return _contentQuery.TypedMedia(ids)
.Where(x => x != null);
}
@@ -75,7 +78,8 @@ namespace Umbraco.Web
/// <returns></returns>
public IEnumerable<IPublishedContent> GetMediaByTagGroup(string tagGroup)
{
var ids = _tagService.GetMediaIdsByTagGroup(tagGroup);
var ids = _tagService.GetTaggedMediaByTagGroup(tagGroup)
.Select(x => x.EntityId);
return _contentQuery.TypedMedia(ids)
.Where(x => x != null);
}