View Source
Class ContentTypeController
An API controller used for dealing with content types
Inheritance
System.Object
Assembly: Umbraco.Web.dll
Syntax
[PluginController("UmbracoApi")]
public class ContentTypeController : ContentTypeControllerBase<IContentType>, IDiscoverable
Constructors
View Source
ContentTypeController(IEntityXmlSerializer, ICultureDictionaryFactory, IGlobalSettings, IUmbracoContextAccessor, ISqlContext, PropertyEditorCollection, ServiceContext, AppCaches, IProfilingLogger, IRuntimeState, UmbracoHelper, IScopeProvider)
Declaration
public ContentTypeController(IEntityXmlSerializer serializer, ICultureDictionaryFactory cultureDictionaryFactory, IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, PropertyEditorCollection propertyEditors, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState, UmbracoHelper umbracoHelper, IScopeProvider scopeProvider)
Parameters
Methods
View Source
DeleteById(Int32)
Deletes a document type with a given ID
Declaration
public HttpResponseMessage DeleteById(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
HttpResponseMessage |
|
View Source
DeleteContainer(Int32)
Deletes a document 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
Export(Int32)
Declaration
public HttpResponseMessage Export(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
HttpResponseMessage |
|
View Source
GetAll()
Returns all content type objects
Declaration
public IEnumerable<ContentTypeBasic> GetAll()
Returns
View Source
GetAllowedChildren(Int32)
Returns the allowed child content type objects for the content item id passed in
Declaration
public IEnumerable<ContentTypeBasic> GetAllowedChildren(int contentId)
Parameters
Type |
Name |
Description |
System.Int32 |
contentId |
|
Returns
View Source
GetAllPropertyTypeAliases()
Gets all user defined properties.
Declaration
public IEnumerable<string> GetAllPropertyTypeAliases()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<System.String> |
|
View Source
GetAllStandardFields()
Gets all the standard fields.
Declaration
public IEnumerable<string> GetAllStandardFields()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<System.String> |
|
View Source
GetAvailableCompositeContentTypes(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 GetAvailableCompositeContentTypes(GetAvailableCompositionsFilter filter)
Parameters
Returns
Type |
Description |
HttpResponseMessage |
|
View Source
GetById(Guid)
Gets the document type a given guid
Declaration
public DocumentTypeDisplay GetById(Guid id)
Parameters
Type |
Name |
Description |
System.Guid |
id |
|
Returns
View Source
GetById(Int32)
Gets the document type a given id
Declaration
public DocumentTypeDisplay GetById(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
View Source
GetById(Udi)
Gets the document type a given udi
Declaration
public DocumentTypeDisplay GetById(Udi id)
Parameters
Type |
Name |
Description |
Udi |
id |
|
Returns
View Source
GetCount()
Declaration
Returns
Type |
Description |
System.Int32 |
|
View Source
GetEmpty(Int32)
Returns an empty content type for use as a scaffold when creating a new type
Declaration
public DocumentTypeDisplay GetEmpty(int parentId)
Parameters
Type |
Name |
Description |
System.Int32 |
parentId |
|
Returns
View Source
GetPropertyTypeScaffold(Int32)
Declaration
public ContentPropertyDisplay GetPropertyTypeScaffold(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
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
HasContentNodes(Int32)
Declaration
public bool HasContentNodes(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
Import(String)
Declaration
public HttpResponseMessage Import(string file)
Parameters
Type |
Name |
Description |
System.String |
file |
|
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
PostCreateDefaultTemplate(Int32)
Declaration
public TemplateDisplay PostCreateDefaultTemplate(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
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(DocumentTypeSave)
Declaration
public DocumentTypeDisplay PostSave(DocumentTypeSave contentTypeSave)
Parameters
Returns
View Source
Upload()
Declaration
public async Task<ContentTypeImportModel> Upload()
Returns