View Source
An API controller used for dealing with content types
Inheritance
System.Object
Assembly: Umbraco.Web.dll
[PluginController("UmbracoApi")]
public class MediaTypeController : ContentTypeControllerBase<IMediaType>, IDiscoverable
Constructors
View Source
MediaTypeController(ICultureDictionaryFactory, IGlobalSettings, IUmbracoContextAccessor, ISqlContext, ServiceContext, AppCaches, IProfilingLogger, IRuntimeState, UmbracoHelper)
Declaration
public MediaTypeController(ICultureDictionaryFactory cultureDictionaryFactory, IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState, UmbracoHelper umbracoHelper)
Parameters
Methods
View Source
Deletes a media type with a given id
Declaration
public HttpResponseMessage DeleteById(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
HttpResponseMessage |
|
View Source
Deletes a media type container with a given ID
Declaration
public HttpResponseMessage DeleteContainer(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
HttpResponseMessage |
|
View Source
Declaration
public IEnumerable<ContentTypeBasic> GetAll()
Returns
View Source
Returns the allowed child content type objects for the content item id passed in - based on a GUID id
Declaration
public IEnumerable<ContentTypeBasic> GetAllowedChildren(Guid contentId)
Parameters
Type |
Name |
Description |
System.Guid |
contentId |
|
Returns
View Source
Returns the allowed child content type objects for the content item id passed in - based on an INT id
Declaration
public IEnumerable<ContentTypeBasic> GetAllowedChildren(int contentId)
Parameters
Type |
Name |
Description |
System.Int32 |
contentId |
|
Returns
View Source
Returns the allowed child content type objects for the content item id passed in - based on a UDI id
Declaration
public IEnumerable<ContentTypeBasic> GetAllowedChildren(Udi contentId)
Parameters
Type |
Name |
Description |
Udi |
contentId |
|
Returns
View Source
GetAvailableCompositeMediaTypes(GetAvailableCompositionsFilter)
Returns the available compositions for this content type
This has been wrapped in a dto instead of simple parameters to support having multiple parameters in post request body
Declaration
public HttpResponseMessage GetAvailableCompositeMediaTypes(GetAvailableCompositionsFilter filter)
Parameters
Returns
Type |
Description |
HttpResponseMessage |
|
View Source
Gets the media type a given guid
Declaration
public MediaTypeDisplay GetById(Guid id)
Parameters
Type |
Name |
Description |
System.Guid |
id |
|
Returns
View Source
Gets the media type a given id
Declaration
public MediaTypeDisplay GetById(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
View Source
Gets the media type a given udi
Declaration
public MediaTypeDisplay GetById(Udi id)
Parameters
Type |
Name |
Description |
Udi |
id |
|
Returns
View Source
Declaration
Returns
Type |
Description |
System.Int32 |
|
View Source
Declaration
public MediaTypeDisplay GetEmpty(int parentId)
Parameters
Type |
Name |
Description |
System.Int32 |
parentId |
|
Returns
View Source
GetWhereCompositionIsUsedInContentTypes(GetAvailableCompositionsFilter)
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 HttpResponseMessage GetWhereCompositionIsUsedInContentTypes(GetAvailableCompositionsFilter filter)
Parameters
Returns
Type |
Description |
HttpResponseMessage |
|
View Source
PostCopy(MoveOrCopy)
Declaration
public HttpResponseMessage PostCopy(MoveOrCopy copy)
Parameters
Returns
Type |
Description |
HttpResponseMessage |
|
View Source
PostCreateContainer(Int32, String)
Declaration
public HttpResponseMessage PostCreateContainer(int parentId, string name)
Parameters
Type |
Name |
Description |
System.Int32 |
parentId |
|
System.String |
name |
|
Returns
Type |
Description |
HttpResponseMessage |
|
View Source
PostMove(MoveOrCopy)
Declaration
public HttpResponseMessage PostMove(MoveOrCopy move)
Parameters
Returns
Type |
Description |
HttpResponseMessage |
|
View Source
PostRenameContainer(Int32, String)
Declaration
public HttpResponseMessage PostRenameContainer(int id, string name)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
System.String |
name |
|
Returns
Type |
Description |
HttpResponseMessage |
|
View Source
PostSave(MediaTypeSave)
Declaration
public MediaTypeDisplay PostSave(MediaTypeSave contentTypeSave)
Parameters
Returns