Search Results for

    Show / Hide Table of Contents
    View Source

    Class ContentTypeControllerBase<TContentType>

    Am abstract API controller providing functionality used for dealing with content and media types

    Inheritance
    System.Object
    Microsoft.AspNetCore.Mvc.ControllerBase
    UmbracoApiControllerBase
    UmbracoApiController
    UmbracoAuthorizedApiController
    UmbracoAuthorizedJsonController
    BackOfficeNotificationsController
    Namespace: Umbraco.Cms.Web.BackOffice.Controllers
    Assembly: Umbraco.Web.BackOffice.dll
    Syntax
    [PrefixlessBodyModelValidator]
    public abstract class ContentTypeControllerBase<TContentType> : BackOfficeNotificationsController where TContentType : class, IContentTypeComposition
    Type Parameters
    Name Description
    TContentType

    Constructors

    View Source

    ContentTypeControllerBase(ICultureDictionary, EditorValidatorCollection, IContentTypeService, IMediaTypeService, IMemberTypeService, IUmbracoMapper, ILocalizedTextService)

    Declaration
    protected ContentTypeControllerBase(ICultureDictionary cultureDictionary, EditorValidatorCollection editorValidatorCollection, IContentTypeService contentTypeService, IMediaTypeService mediaTypeService, IMemberTypeService memberTypeService, IUmbracoMapper umbracoMapper, ILocalizedTextService localizedTextService)
    Parameters
    Type Name Description
    ICultureDictionary cultureDictionary
    EditorValidatorCollection editorValidatorCollection
    IContentTypeService contentTypeService
    IMediaTypeService mediaTypeService
    IMemberTypeService memberTypeService
    IUmbracoMapper umbracoMapper
    ILocalizedTextService localizedTextService

    Properties

    View Source

    ContentTypeService

    Declaration
    public IContentTypeService ContentTypeService { get; }
    Property Value
    Type Description
    IContentTypeService
    View Source

    CultureDictionary

    Declaration
    protected ICultureDictionary CultureDictionary { get; }
    Property Value
    Type Description
    ICultureDictionary
    View Source

    LocalizedTextService

    Declaration
    public ILocalizedTextService LocalizedTextService { get; }
    Property Value
    Type Description
    ILocalizedTextService
    View Source

    MediaTypeService

    Declaration
    public IMediaTypeService MediaTypeService { get; }
    Property Value
    Type Description
    IMediaTypeService
    View Source

    MemberTypeService

    Declaration
    public IMemberTypeService MemberTypeService { get; }
    Property Value
    Type Description
    IMemberTypeService
    View Source

    UmbracoMapper

    Declaration
    public IUmbracoMapper UmbracoMapper { get; }
    Property Value
    Type Description
    IUmbracoMapper

    Methods

    View Source

    GetContentTypeService<T>()

    Declaration
    public IContentTypeBaseService<T>? GetContentTypeService<T>()
        where T : IContentTypeComposition
    Returns
    Type Description
    System.Nullable<IContentTypeBaseService<T>>
    Type Parameters
    Name Description
    T
    View Source

    PerformCopy(MoveOrCopy, Func<Int32, TContentType>, Func<TContentType, Int32, Attempt<Nullable<OperationResult<MoveOperationStatusType, TContentType>>>>)

    Move

    Declaration
    protected IActionResult PerformCopy(MoveOrCopy move, Func<int, TContentType> getContentType, Func<TContentType, int, Attempt<OperationResult<MoveOperationStatusType, TContentType>?>> doCopy)
    Parameters
    Type Name Description
    MoveOrCopy move
    Func<System.Int32, TContentType> getContentType
    Func<TContentType, System.Int32, Attempt<System.Nullable<OperationResult<MoveOperationStatusType, TContentType>>>> doCopy
    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.IActionResult
    View Source

    PerformGetAvailableCompositeContentTypes(Int32, UmbracoObjectTypes, String[], String[], Boolean)

    Returns the available composite content types for a given content type

    Declaration
    protected ActionResult<IEnumerable<Tuple<EntityBasic?, bool>>> PerformGetAvailableCompositeContentTypes(int contentTypeId, UmbracoObjectTypes type, string[] filterContentTypes, string[] filterPropertyTypes, bool isElement)
    Parameters
    Type Name Description
    System.Int32 contentTypeId
    UmbracoObjectTypes type
    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
    Microsoft.AspNetCore.Mvc.ActionResult<IEnumerable<Tuple<System.Nullable<EntityBasic>, System.Boolean>>>
    View Source

    PerformGetWhereCompositionIsUsedInContentTypes(Int32, UmbracoObjectTypes)

    Returns a list of content types where a particular composition content type is used

    Declaration
    protected ActionResult<IEnumerable<EntityBasic>> PerformGetWhereCompositionIsUsedInContentTypes(int contentTypeId, UmbracoObjectTypes type)
    Parameters
    Type Name Description
    System.Int32 contentTypeId

    Id of composition content type

    UmbracoObjectTypes type

    Type of content Type, eg documentType or mediaType

    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.ActionResult<IEnumerable<EntityBasic>>
    View Source

    PerformMove(MoveOrCopy, Func<Int32, TContentType>, Func<TContentType, Int32, Attempt<Nullable<OperationResult<MoveOperationStatusType>>>>)

    Move

    Declaration
    protected IActionResult PerformMove(MoveOrCopy move, Func<int, TContentType> getContentType, Func<TContentType, int, Attempt<OperationResult<MoveOperationStatusType>?>> doMove)
    Parameters
    Type Name Description
    MoveOrCopy move
    Func<System.Int32, TContentType> getContentType
    Func<TContentType, System.Int32, Attempt<System.Nullable<OperationResult<MoveOperationStatusType>>>> doMove
    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.IActionResult
    View Source

    PerformPostSave<TContentTypeDisplay, TContentTypeSave, TPropertyType>(TContentTypeSave, Func<Int32, TContentType>, Action<TContentType>, Nullable<Action<TContentTypeSave>>)

    Declaration
    protected ActionResult<TContentType> PerformPostSave<TContentTypeDisplay, TContentTypeSave, TPropertyType>(TContentTypeSave contentTypeSave, Func<int, TContentType> getContentType, Action<TContentType> saveContentType, Action<TContentTypeSave>? beforeCreateNew = null)
        where TContentTypeDisplay : ContentTypeCompositionDisplay where TContentTypeSave : ContentTypeSave<TPropertyType> where TPropertyType : PropertyTypeBasic
    Parameters
    Type Name Description
    TContentTypeSave contentTypeSave
    Func<System.Int32, TContentType> getContentType
    Action<TContentType> saveContentType
    System.Nullable<Action<TContentTypeSave>> beforeCreateNew
    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.ActionResult<TContentType>
    Type Parameters
    Name Description
    TContentTypeDisplay
    TContentTypeSave
    TPropertyType
    View Source

    TranslateItem(String)

    Declaration
    protected string TranslateItem(string text)
    Parameters
    Type Name Description
    System.String text
    Returns
    Type Description
    System.String
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • ContentTypeControllerBase(ICultureDictionary, EditorValidatorCollection, IContentTypeService, IMediaTypeService, IMemberTypeService, IUmbracoMapper, ILocalizedTextService)
    • Properties
      • ContentTypeService
      • CultureDictionary
      • LocalizedTextService
      • MediaTypeService
      • MemberTypeService
      • UmbracoMapper
    • Methods
      • GetContentTypeService<T>()
      • PerformCopy(MoveOrCopy, Func<Int32, TContentType>, Func<TContentType, Int32, Attempt<Nullable<OperationResult<MoveOperationStatusType, TContentType>>>>)
      • PerformGetAvailableCompositeContentTypes(Int32, UmbracoObjectTypes, String[], String[], Boolean)
      • PerformGetWhereCompositionIsUsedInContentTypes(Int32, UmbracoObjectTypes)
      • PerformMove(MoveOrCopy, Func<Int32, TContentType>, Func<TContentType, Int32, Attempt<Nullable<OperationResult<MoveOperationStatusType>>>>)
      • PerformPostSave<TContentTypeDisplay, TContentTypeSave, TPropertyType>(TContentTypeSave, Func<Int32, TContentType>, Action<TContentType>, Nullable<Action<TContentTypeSave>>)
      • TranslateItem(String)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX