Search Results for

    Show / Hide Table of Contents
    View Source

    Class TagQuery

    Implements ITagQuery.

    Inheritance
    object
    Namespace: Umbraco.Cms.Core
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public class TagQuery : ITagQuery

    Constructors

    View Source

    TagQuery(ITagService, IPublishedContentQuery, IUmbracoMapper)

    Initializes a new instance of the TagQuery class.

    Declaration
    public TagQuery(ITagService tagService, IPublishedContentQuery contentQuery, IUmbracoMapper mapper)
    Parameters
    Type Name Description
    ITagService tagService
    IPublishedContentQuery contentQuery
    IUmbracoMapper mapper

    Methods

    View Source

    GetAllContentTags(string?, string?)

    Gets all document tags.

    Declaration
    public IEnumerable<TagModel?> GetAllContentTags(string? group = null, string? culture = null)
    Parameters
    Type Name Description
    string group
    string culture
    Returns
    Type Description
    IEnumerable<TagModel>
    Remarks

    If no culture is specified, it retrieves tags with an invariant culture. If a culture is specified, it only retrieves tags for that culture. Use "*" to retrieve tags for all cultures.

    View Source

    GetAllMediaTags(string?, string?)

    Gets all media tags.

    Declaration
    public IEnumerable<TagModel?> GetAllMediaTags(string? group = null, string? culture = null)
    Parameters
    Type Name Description
    string group
    string culture
    Returns
    Type Description
    IEnumerable<TagModel>
    View Source

    GetAllMemberTags(string?, string?)

    Gets all member tags.

    Declaration
    public IEnumerable<TagModel?> GetAllMemberTags(string? group = null, string? culture = null)
    Parameters
    Type Name Description
    string group
    string culture
    Returns
    Type Description
    IEnumerable<TagModel>
    View Source

    GetAllTags(string?, string?)

    Gets all tags.

    Declaration
    public IEnumerable<TagModel?> GetAllTags(string? group = null, string? culture = null)
    Parameters
    Type Name Description
    string group
    string culture
    Returns
    Type Description
    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
    string tag
    string group
    string culture
    Returns
    Type Description
    IEnumerable<IPublishedContent>
    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
    string group
    string culture
    Returns
    Type Description
    IEnumerable<IPublishedContent>
    View Source

    GetMediaByTag(string, string?, string?)

    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
    string tag
    string group
    string culture
    Returns
    Type Description
    IEnumerable<IPublishedContent>
    View Source

    GetMediaByTagGroup(string, string?)

    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
    string group
    string culture
    Returns
    Type Description
    IEnumerable<IPublishedContent>
    View Source

    GetTagsForEntity(int, string?, string?)

    Gets all tags attached to an entity.

    Declaration
    public IEnumerable<TagModel?> GetTagsForEntity(int contentId, string? group = null, string? culture = null)
    Parameters
    Type Name Description
    int contentId
    string group
    string culture
    Returns
    Type Description
    IEnumerable<TagModel>
    View Source

    GetTagsForProperty(int, string, string?, string?)

    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
    int contentId
    string propertyTypeAlias
    string group
    string culture
    Returns
    Type Description
    IEnumerable<TagModel>
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX