Class ContentTypeServiceExtensions
Inheritance
Namespace: Umbraco.Extensions
Assembly: Umbraco.Core.dll
Syntax
public static class ContentTypeServiceExtensions
Methods
View SourceGetAllElementTypes(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. |
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 |