View Source
Class DataTypeController
The API controller used for editing data types
Inheritance
System.Object
Assembly: Umbraco.Web.dll
Syntax
[PluginController("UmbracoApi")]
public class DataTypeController : BackOfficeNotificationsController, IDiscoverable
Constructors
View Source
DataTypeController(PropertyEditorCollection, IGlobalSettings, IUmbracoContextAccessor, ISqlContext, ServiceContext, AppCaches, IProfilingLogger, IRuntimeState, UmbracoHelper)
Declaration
public DataTypeController(PropertyEditorCollection propertyEditors, IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState, UmbracoHelper umbracoHelper)
Parameters
Methods
View Source
DeleteById(Int32)
Deletes a data 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 data 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
GetAll()
Gets the content json for all data types
Declaration
public IEnumerable<DataTypeBasic> GetAll()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<DataTypeBasic> |
|
View Source
GetAllPropertyEditors()
Gets all property editors defined
Declaration
public IEnumerable<PropertyEditorBasic> GetAllPropertyEditors()
Returns
View Source
GetById(Guid)
Gets the datatype json for the datatype guid
Declaration
public DataTypeDisplay GetById(Guid id)
Parameters
Type |
Name |
Description |
System.Guid |
id |
|
Returns
View Source
GetById(Int32)
Gets the datatype json for the datatype id
Declaration
public DataTypeDisplay GetById(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
View Source
GetById(Udi)
Gets the datatype json for the datatype udi
Declaration
public DataTypeDisplay GetById(Udi id)
Parameters
Type |
Name |
Description |
Udi |
id |
|
Returns
View Source
GetByName(String)
Declaration
public DataTypeDisplay GetByName(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
View Source
GetCustomListView(String)
Returns a custom listview, based on a content type alias, if found
Declaration
public DataTypeDisplay GetCustomListView(string contentTypeAlias)
Parameters
Type |
Name |
Description |
System.String |
contentTypeAlias |
|
Returns
View Source
GetEmpty(Int32)
Declaration
public DataTypeDisplay GetEmpty(int parentId)
Parameters
Type |
Name |
Description |
System.Int32 |
parentId |
|
Returns
View Source
GetGroupedDataTypes()
Returns all data types grouped by their property editor group
Declaration
public IDictionary<string, IEnumerable<DataTypeBasic>> GetGroupedDataTypes()
Returns
Type |
Description |
System.Collections.Generic.IDictionary<System.String, System.Collections.Generic.IEnumerable<DataTypeBasic>> |
|
View Source
GetGroupedPropertyEditors()
Returns all property editors grouped
Declaration
public IDictionary<string, IEnumerable<DataTypeBasic>> GetGroupedPropertyEditors()
Returns
Type |
Description |
System.Collections.Generic.IDictionary<System.String, System.Collections.Generic.IEnumerable<DataTypeBasic>> |
|
View Source
GetPreValues(String, Int32)
Returns the pre-values for the specified property editor
Declaration
public IEnumerable<DataTypeConfigurationFieldDisplay> GetPreValues(string editorAlias, int dataTypeId = -1)
Parameters
Type |
Name |
Description |
System.String |
editorAlias |
|
System.Int32 |
dataTypeId |
The data type id for the pre-values, -1 if it is a new data type
|
Returns
View Source
GetReferences(Int32)
Returns the references (usages) for the data type
Declaration
public DataTypeReferences GetReferences(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
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
PostCreateCustomListView(String)
Creates a custom list view - give a document type alias
Declaration
public DataTypeDisplay PostCreateCustomListView(string contentTypeAlias)
Parameters
Type |
Name |
Description |
System.String |
contentTypeAlias |
|
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(DataTypeSave)
Declaration
public DataTypeDisplay PostSave(DataTypeSave dataType)
Parameters
Returns