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
-
ContentTypeControllerBase<IMemberType>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
cultureDictionaryICultureDictionaryeditorValidatorCollectionEditorValidatorCollectioncontentTypeServiceIContentTypeServicemediaTypeServiceIMediaTypeServicememberTypeServiceIMemberTypeServiceumbracoMapperIUmbracoMapperlocalizedTextServiceILocalizedTextServicebackofficeSecurityAccessorIBackOfficeSecurityAccessorshortStringHelperIShortStringHelper
Methods
DeleteById(int)
Deletes a document type with a given id
[HttpDelete]
[HttpPost]
public IActionResult DeleteById(int id)
Parameters
idint
Returns
GetAvailableCompositeMemberTypes(int, string[], string[])
Returns the available compositions for this content type
public IActionResult GetAvailableCompositeMemberTypes(int contentTypeId, string[] filterContentTypes, string[] filterPropertyTypes)
Parameters
contentTypeIdintfilterContentTypesstring[]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
filterPropertyTypesstring[]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
GetById(Guid)
Gets the member type a given guid
public ActionResult<MemberTypeDisplay?> GetById(Guid id)
Parameters
idGuid
Returns
- ActionResult<MemberTypeDisplay>
GetById(int)
Gets the member type a given id
public ActionResult<MemberTypeDisplay?> GetById(int id)
Parameters
idint
Returns
- ActionResult<MemberTypeDisplay>
GetById(Udi)
Gets the member type a given udi
public ActionResult<MemberTypeDisplay?> GetById(Udi id)
Parameters
idUdi
Returns
- ActionResult<MemberTypeDisplay>
GetCount()
public int GetCount()
Returns
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
contentTypeIdint
Returns
PostCopy(MoveOrCopy)
Copy the member type
[Authorize(Policy = "TreeAccessMemberTypes")]
public IActionResult PostCopy(MoveOrCopy copy)
Parameters
copyMoveOrCopy
Returns
PostSave(MemberTypeSave)
public ActionResult<MemberTypeDisplay?> PostSave(MemberTypeSave contentTypeSave)
Parameters
contentTypeSaveMemberTypeSave
Returns
- ActionResult<MemberTypeDisplay>