Table of Contents

Class MemberTypeController

Namespace
Umbraco.Cms.Web.BackOffice.Controllers
Assembly
Umbraco.Web.BackOffice.dll

An API controller used for dealing with member types

[Authorize(Policy = "TreeAccessMemberTypes")]
public class MemberTypeController : ContentTypeControllerBase<IMemberType>
Inheritance
MemberTypeController
Inherited Members

Constructors

MemberTypeController(ICultureDictionary, EditorValidatorCollection, IContentTypeService, IMediaTypeService, IMemberTypeService, IUmbracoMapper, ILocalizedTextService, IBackOfficeSecurityAccessor, IShortStringHelper)

public MemberTypeController(ICultureDictionary cultureDictionary, EditorValidatorCollection editorValidatorCollection, IContentTypeService contentTypeService, IMediaTypeService mediaTypeService, IMemberTypeService memberTypeService, IUmbracoMapper umbracoMapper, ILocalizedTextService localizedTextService, IBackOfficeSecurityAccessor backofficeSecurityAccessor, IShortStringHelper shortStringHelper)

Parameters

cultureDictionary ICultureDictionary
editorValidatorCollection EditorValidatorCollection
contentTypeService IContentTypeService
mediaTypeService IMediaTypeService
memberTypeService IMemberTypeService
umbracoMapper IUmbracoMapper
localizedTextService ILocalizedTextService
backofficeSecurityAccessor IBackOfficeSecurityAccessor
shortStringHelper IShortStringHelper

Methods

DeleteById(int)

Deletes a document type with a given id

[HttpDelete]
[HttpPost]
public IActionResult DeleteById(int id)

Parameters

id int

Returns

IActionResult

GetAvailableCompositeMemberTypes(int, string[], string[])

Returns the available compositions for this content type

public IActionResult GetAvailableCompositeMemberTypes(int contentTypeId, string[] filterContentTypes, string[] filterPropertyTypes)

Parameters

contentTypeId int
filterContentTypes string[]

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

filterPropertyTypes string[]

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

IActionResult

GetById(Guid)

Gets the member type a given guid

public ActionResult<MemberTypeDisplay?> GetById(Guid id)

Parameters

id Guid

Returns

ActionResult<MemberTypeDisplay>

GetById(int)

Gets the member type a given id

public ActionResult<MemberTypeDisplay?> GetById(int id)

Parameters

id int

Returns

ActionResult<MemberTypeDisplay>

GetById(Udi)

Gets the member type a given udi

public ActionResult<MemberTypeDisplay?> GetById(Udi id)

Parameters

id Udi

Returns

ActionResult<MemberTypeDisplay>

GetCount()

public int GetCount()

Returns

int

GetEmpty()

public MemberTypeDisplay? GetEmpty()

Returns

MemberTypeDisplay

GetWhereCompositionIsUsedInMemberTypes(int)

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

public IActionResult GetWhereCompositionIsUsedInMemberTypes(int contentTypeId)

Parameters

contentTypeId int

Returns

IActionResult

PostCopy(MoveOrCopy)

Copy the member type

[Authorize(Policy = "TreeAccessMemberTypes")]
public IActionResult PostCopy(MoveOrCopy copy)

Parameters

copy MoveOrCopy

Returns

IActionResult

PostSave(MemberTypeSave)

public ActionResult<MemberTypeDisplay?> PostSave(MemberTypeSave contentTypeSave)

Parameters

contentTypeSave MemberTypeSave

Returns

ActionResult<MemberTypeDisplay>