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
[PluginController("UmbracoApi")]
[Authorize(Policy = "TreeAccessMemberTypes")]
public class MemberTypeController : ContentTypeControllerBase<IMemberType>, IUmbracoFeature, IDiscoverable
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
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
GetAllTypes()
Declaration
[Authorize(Policy = "TreeAccessMembersOrMemberTypes")]
public IEnumerable<ContentTypeBasic> GetAllTypes()
Returns
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
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
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
View Source
GetEmpty()
Declaration
public MemberTypeDisplay GetEmpty()
Returns
View Source
PostCopy(MoveOrCopy)
Declaration
[Authorize(Policy = "TreeAccessMemberTypes")]
public IActionResult PostCopy(MoveOrCopy copy)
Parameters
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.IActionResult |
|
View Source
PostSave(MemberTypeSave)
Declaration
public ActionResult<MemberTypeDisplay> PostSave(MemberTypeSave contentTypeSave)
Parameters
Returns