Search Results for

    Show / Hide Table of Contents
    View Source

    Class ContentTypeServiceExtensions

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

    Methods

    View Source

    GetAllElementTypes(IContentTypeService)

    Gets all of the element types (e.g. content types that have been marked as an element type).

    Declaration
    public static IEnumerable<IContentType> GetAllElementTypes(this IContentTypeService contentTypeService)
    Parameters
    Type Name Description
    IContentTypeService contentTypeService

    The content type service.

    Returns
    Type Description
    IEnumerable<IContentType>

    Returns all the element types.

    View Source

    GetAvailableCompositeContentTypes(IContentTypeService, IContentTypeComposition, IContentTypeComposition[], String[], String[], Boolean)

    Returns the available composite content types for a given content type

    Declaration
    public static ContentTypeAvailableCompositionsResults GetAvailableCompositeContentTypes(this IContentTypeService ctService, IContentTypeComposition source, IContentTypeComposition[] allContentTypes, string[] filterContentTypes = null, string[] filterPropertyTypes = null, bool isElement = false)
    Parameters
    Type Name Description
    IContentTypeService ctService
    IContentTypeComposition source
    IContentTypeComposition[] allContentTypes
    System.String[] filterContentTypes

    This is normally an empty list but if additional content type aliases are passed in, any content types containing those aliases will be filtered out along with any content types that have matching property types that are included in the filtered content types

    System.String[] filterPropertyTypes

    This is normally an empty list but if additional property type aliases are passed in, any content types that have these aliases will be filtered out. This is required because in the case of creating/modifying a content type because new property types being added to it are not yet persisted so cannot be looked up via the db, they need to be passed in.

    System.Boolean isElement

    Whether the composite content types should be applicable for an element type

    Returns
    Type Description
    ContentTypeAvailableCompositionsResults
    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • GetAllElementTypes(IContentTypeService)
      • GetAvailableCompositeContentTypes(IContentTypeService, IContentTypeComposition, IContentTypeComposition[], String[], String[], Boolean)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX