Search Results for

    Show / Hide Table of Contents
    View Source

    Class PropertyTagsExtensions

    Provides extension methods for the Property class to manage tags.

    Inheritance
    System.Object
    Namespace: Umbraco.Extensions
    Assembly: Umbraco.Core.dll
    Syntax
    public static class PropertyTagsExtensions

    Methods

    View Source

    AssignTags(IProperty, PropertyEditorCollection, IDataTypeService, IJsonSerializer, IEnumerable<String>, Boolean, String)

    Assign tags.

    Declaration
    public static void AssignTags(this IProperty property, PropertyEditorCollection propertyEditors, IDataTypeService dataTypeService, IJsonSerializer serializer, IEnumerable<string> tags, bool merge = false, string culture = null)
    Parameters
    Type Name Description
    IProperty property

    The property.

    PropertyEditorCollection propertyEditors
    IDataTypeService dataTypeService
    IJsonSerializer serializer
    IEnumerable<System.String> tags

    The tags.

    System.Boolean merge

    A value indicating whether to merge the tags with existing tags instead of replacing them.

    System.String culture

    A culture, for multi-lingual properties.

    View Source

    GetTagConfiguration(IProperty, PropertyEditorCollection, IDataTypeService)

    Declaration
    public static TagConfiguration GetTagConfiguration(this IProperty property, PropertyEditorCollection propertyEditors, IDataTypeService dataTypeService)
    Parameters
    Type Name Description
    IProperty property
    PropertyEditorCollection propertyEditors
    IDataTypeService dataTypeService
    Returns
    Type Description
    TagConfiguration
    View Source

    GetTagsValue(IProperty, PropertyEditorCollection, IDataTypeService, IJsonSerializer, String)

    Declaration
    public static IEnumerable<string> GetTagsValue(this IProperty property, PropertyEditorCollection propertyEditors, IDataTypeService dataTypeService, IJsonSerializer serializer, string culture = null)
    Parameters
    Type Name Description
    IProperty property
    PropertyEditorCollection propertyEditors
    IDataTypeService dataTypeService
    IJsonSerializer serializer
    System.String culture
    Returns
    Type Description
    IEnumerable<System.String>
    View Source

    RemoveTags(IProperty, PropertyEditorCollection, IDataTypeService, IJsonSerializer, IEnumerable<String>, String)

    Removes tags.

    Declaration
    public static void RemoveTags(this IProperty property, PropertyEditorCollection propertyEditors, IDataTypeService dataTypeService, IJsonSerializer serializer, IEnumerable<string> tags, string culture = null)
    Parameters
    Type Name Description
    IProperty property

    The property.

    PropertyEditorCollection propertyEditors
    IDataTypeService dataTypeService
    IJsonSerializer serializer
    IEnumerable<System.String> tags

    The tags.

    System.String culture

    A culture, for multi-lingual properties.

    View Source

    SetTagsValue(IProperty, IJsonSerializer, Object, TagConfiguration, String)

    Sets tags on a content property, based on the property editor tags configuration.

    Declaration
    public static void SetTagsValue(this IProperty property, IJsonSerializer serializer, object value, TagConfiguration tagConfiguration, string culture)
    Parameters
    Type Name Description
    IProperty property

    The property.

    IJsonSerializer serializer
    System.Object value

    The property value.

    TagConfiguration tagConfiguration

    The datatype configuration.

    System.String culture

    A culture, for multi-lingual properties.

    Remarks

    The value is either a string (delimited string) or an enumeration of strings (tag list).

    This is used both by the content repositories to initialize a property with some tag values, and by the content controllers to update a property with values received from the property editor.

    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • AssignTags(IProperty, PropertyEditorCollection, IDataTypeService, IJsonSerializer, IEnumerable<String>, Boolean, String)
      • GetTagConfiguration(IProperty, PropertyEditorCollection, IDataTypeService)
      • GetTagsValue(IProperty, PropertyEditorCollection, IDataTypeService, IJsonSerializer, String)
      • RemoveTags(IProperty, PropertyEditorCollection, IDataTypeService, IJsonSerializer, IEnumerable<String>, String)
      • SetTagsValue(IProperty, IJsonSerializer, Object, TagConfiguration, String)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX