View Source
  Class MemberTypeController
  
  An API controller used for dealing with member types
 
  
  
    Inheritance
      System.Object
      Microsoft.AspNetCore.Mvc.ControllerBase
      
      
      
      
      
      
      
   
  
  Assembly: Umbraco.Web.BackOffice.dll
  Syntax
  
    [Authorize(Policy = "TreeAccessMemberTypes")]
public class MemberTypeController : ContentTypeControllerBase<IMemberType>
   
  Constructors
  
  
    View Source
  
  MemberTypeController(ICultureDictionary, EditorValidatorCollection, IContentTypeService, IMediaTypeService, IMemberTypeService, IUmbracoMapper, ILocalizedTextService, IBackOfficeSecurityAccessor, IShortStringHelper)
  
  
  Declaration
  
    public MemberTypeController(ICultureDictionary cultureDictionary, EditorValidatorCollection editorValidatorCollection, IContentTypeService contentTypeService, IMediaTypeService mediaTypeService, IMemberTypeService memberTypeService, IUmbracoMapper umbracoMapper, ILocalizedTextService localizedTextService, IBackOfficeSecurityAccessor backofficeSecurityAccessor, IShortStringHelper shortStringHelper)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | ICultureDictionary | 
        cultureDictionary | 
         | 
      
      
        | EditorValidatorCollection | 
        editorValidatorCollection | 
         | 
      
      
        | IContentTypeService | 
        contentTypeService | 
         | 
      
      
        | IMediaTypeService | 
        mediaTypeService | 
         | 
      
      
        | IMemberTypeService | 
        memberTypeService | 
         | 
      
      
        | IUmbracoMapper | 
        umbracoMapper | 
         | 
      
      
        | ILocalizedTextService | 
        localizedTextService | 
         | 
      
      
        | IBackOfficeSecurityAccessor | 
        backofficeSecurityAccessor | 
         | 
      
      
        | IShortStringHelper | 
        shortStringHelper | 
         | 
      
    
  
  Methods
  
  
    View Source
  
  DeleteById(Int32)
  Deletes a document type with a given id
 
  
  Declaration
  
    [HttpDelete]
[HttpPost]
public IActionResult DeleteById(int id)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Int32 | 
        id | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | Microsoft.AspNetCore.Mvc.IActionResult | 
         | 
      
    
  
  
    View Source
  
  GetAvailableCompositeMemberTypes(Int32, String[], String[])
  Returns the available compositions for this content type
 
  
  Declaration
  
    public IActionResult GetAvailableCompositeMemberTypes(int contentTypeId, [FromQuery] string[] filterContentTypes, [FromQuery] string[] filterPropertyTypes)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Int32 | 
        contentTypeId | 
         | 
      
      
        | 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. 
 | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | Microsoft.AspNetCore.Mvc.IActionResult | 
         | 
      
    
  
  
    View Source
  
  GetById(Guid)
  Gets the member type a given guid
 
  
  Declaration
  
    public ActionResult<MemberTypeDisplay?> GetById(Guid id)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | Guid | 
        id | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | Microsoft.AspNetCore.Mvc.ActionResult<System.Nullable<MemberTypeDisplay>> | 
         | 
      
    
  
  
    View Source
  
  GetById(Int32)
  Gets the member type a given id
 
  
  Declaration
  
    public ActionResult<MemberTypeDisplay?> GetById(int id)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Int32 | 
        id | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | Microsoft.AspNetCore.Mvc.ActionResult<System.Nullable<MemberTypeDisplay>> | 
         | 
      
    
  
  
    View Source
  
  GetById(Udi)
  Gets the member type a given udi
 
  
  Declaration
  
    public ActionResult<MemberTypeDisplay?> GetById(Udi id)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | Udi | 
        id | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | Microsoft.AspNetCore.Mvc.ActionResult<System.Nullable<MemberTypeDisplay>> | 
         | 
      
    
  
  
    View Source
  
  GetCount()
  
  
  Declaration
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Int32 | 
         | 
      
    
  
  
    View Source
  
  GetEmpty()
  
  
  Declaration
  
    public MemberTypeDisplay? GetEmpty()
   
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Nullable<MemberTypeDisplay> | 
         | 
      
    
  
  
    View Source
  
  GetWhereCompositionIsUsedInMemberTypes(Int32)
  Returns where a particular composition has been used
This has been wrapped in a dto instead of simple parameters to support having multiple parameters in post request
body
 
  
  Declaration
  
    public IActionResult GetWhereCompositionIsUsedInMemberTypes(int contentTypeId)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Int32 | 
        contentTypeId | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | Microsoft.AspNetCore.Mvc.IActionResult | 
         | 
      
    
  
  
    View Source
  
  PostCopy(MoveOrCopy)
  
  
  Declaration
  
    [Authorize(Policy = "TreeAccessMemberTypes")]
public IActionResult PostCopy(MoveOrCopy copy)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | MoveOrCopy | 
        copy | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | Microsoft.AspNetCore.Mvc.IActionResult | 
         | 
      
    
  
  
    View Source
  
  PostSave(MemberTypeSave)
  
  
  Declaration
  
    public ActionResult<MemberTypeDisplay?> PostSave(MemberTypeSave contentTypeSave)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | MemberTypeSave | 
        contentTypeSave | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | Microsoft.AspNetCore.Mvc.ActionResult<System.Nullable<MemberTypeDisplay>> | 
         |