View Source
Class TagQuery
Inheritance
System.Object
Assembly: Umbraco.Web.dll
Syntax
public class TagQuery : ITagQuery
Constructors
View Source
TagQuery(ITagService, IPublishedContentQuery, UmbracoMapper)
Initializes a new instance of the TagQuery class.
Declaration
public TagQuery(ITagService tagService, IPublishedContentQuery contentQuery, UmbracoMapper mapper)
Parameters
Methods
View Source
GetAllContentTags(String, String)
Declaration
public IEnumerable<TagModel> GetAllContentTags(string group = null, string culture = null)
Parameters
Type |
Name |
Description |
System.String |
group |
|
System.String |
culture |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<TagModel> |
|
View Source
Declaration
public IEnumerable<TagModel> GetAllMediaTags(string group = null, string culture = null)
Parameters
Type |
Name |
Description |
System.String |
group |
|
System.String |
culture |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<TagModel> |
|
View Source
Declaration
public IEnumerable<TagModel> GetAllMemberTags(string group = null, string culture = null)
Parameters
Type |
Name |
Description |
System.String |
group |
|
System.String |
culture |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<TagModel> |
|
View Source
Declaration
public IEnumerable<TagModel> GetAllTags(string group = null, string culture = null)
Parameters
Type |
Name |
Description |
System.String |
group |
|
System.String |
culture |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<TagModel> |
|
View Source
GetContentByTag(String, String, String)
Gets all documents tagged with the specified tag.
Declaration
public IEnumerable<IPublishedContent> GetContentByTag(string tag, string group = null, string culture = null)
Parameters
Type |
Name |
Description |
System.String |
tag |
|
System.String |
group |
|
System.String |
culture |
|
Returns
View Source
GetContentByTagGroup(String, String)
Gets all documents tagged with any tag in the specified group.
Declaration
public IEnumerable<IPublishedContent> GetContentByTagGroup(string group, string culture = null)
Parameters
Type |
Name |
Description |
System.String |
group |
|
System.String |
culture |
|
Returns
View Source
Gets all media tagged with the specified tag.
Declaration
public IEnumerable<IPublishedContent> GetMediaByTag(string tag, string group = null, string culture = null)
Parameters
Type |
Name |
Description |
System.String |
tag |
|
System.String |
group |
|
System.String |
culture |
|
Returns
View Source
Gets all media tagged with any tag in the specified group.
Declaration
public IEnumerable<IPublishedContent> GetMediaByTagGroup(string group, string culture = null)
Parameters
Type |
Name |
Description |
System.String |
group |
|
System.String |
culture |
|
Returns
View Source
Gets all tags attached to an entity.
Declaration
public IEnumerable<TagModel> GetTagsForEntity(int contentId, string group = null, string culture = null)
Parameters
Type |
Name |
Description |
System.Int32 |
contentId |
|
System.String |
group |
|
System.String |
culture |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<TagModel> |
|
View Source
Gets all tags attached to an entity via a property.
Declaration
public IEnumerable<TagModel> GetTagsForProperty(int contentId, string propertyTypeAlias, string group = null, string culture = null)
Parameters
Type |
Name |
Description |
System.Int32 |
contentId |
|
System.String |
propertyTypeAlias |
|
System.String |
group |
|
System.String |
culture |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<TagModel> |
|