Class DictionaryController
The API controller used for editing dictionary items
Inheritance
System.Object
Namespace: Umbraco.Web.Editors
Assembly: Umbraco.Web.dll
Syntax
[PluginController("UmbracoApi")]
public class DictionaryController : BackOfficeNotificationsController, IDiscoverable
Remarks
The security for this controller is defined to allow full CRUD access to dictionary if the user has access to either: Dictionary
Constructors
View SourceDictionaryController(IGlobalSettings, IUmbracoContextAccessor, ISqlContext, ServiceContext, AppCaches, IProfilingLogger, IRuntimeState, UmbracoHelper)
Declaration
public DictionaryController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState, UmbracoHelper umbracoHelper)
Parameters
Type | Name | Description |
---|---|---|
IGlobalSettings | globalSettings | |
IUmbracoContextAccessor | umbracoContextAccessor | |
ISqlContext | sqlContext | |
ServiceContext | services | |
AppCaches | appCaches | |
IProfilingLogger | logger | |
IRuntimeState | runtimeState | |
UmbracoHelper | umbracoHelper |
Methods
View SourceCreate(Int32, String)
Creates a new dictionary item
Declaration
public HttpResponseMessage Create(int parentId, string key)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | parentId | The parent id. |
System.String | key | The key. |
Returns
Type | Description |
---|---|
HttpResponseMessage | The |
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 |
GetById(Guid)
Gets a dictionary item by guid
Declaration
public DictionaryDisplay GetById(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | The id. |
Returns
Type | Description |
---|---|
DictionaryDisplay | The DictionaryDisplay. |
GetById(Int32)
Gets a dictionary item by id
Declaration
public DictionaryDisplay GetById(int id)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | The id. |
Returns
Type | Description |
---|---|
DictionaryDisplay | The DictionaryDisplay. |
GetById(Udi)
Gets a dictionary item by udi
Declaration
public DictionaryDisplay GetById(Udi id)
Parameters
Type | Name | Description |
---|---|---|
Udi | id | The id. |
Returns
Type | Description |
---|---|
DictionaryDisplay | The DictionaryDisplay. |
GetList()
Retrieves a list with all dictionary items
Declaration
public IEnumerable<DictionaryOverviewDisplay> GetList()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<DictionaryOverviewDisplay> | The System.Collections.Generic.IEnumerable<T>. |
PostSave(DictionarySave)
Saves a dictionary item
Declaration
public DictionaryDisplay PostSave(DictionarySave dictionary)
Parameters
Type | Name | Description |
---|---|---|
DictionarySave | dictionary | The dictionary. |
Returns
Type | Description |
---|---|
DictionaryDisplay | The DictionaryDisplay. |