• Core
  • Infrastructure
  • Web
  • Extensions
Search Results for

    Show / Hide Table of Contents
    View Source

    Class DictionaryController

    The API controller used for editing dictionary items

    Inheritance
    System.Object
    Microsoft.AspNetCore.Mvc.ControllerBase
    UmbracoApiControllerBase
    UmbracoApiController
    UmbracoAuthorizedApiController
    UmbracoAuthorizedJsonController
    BackOfficeNotificationsController
    Namespace: Umbraco.Cms.Web.BackOffice.Controllers
    Assembly: Umbraco.Web.BackOffice.dll
    Syntax
    [Authorize(Policy = "TreeAccessDictionary")]
    public class DictionaryController : BackOfficeNotificationsController
    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 Source

    DictionaryController(ILogger<DictionaryController>, ILocalizationService, IBackOfficeSecurityAccessor, IOptionsSnapshot<GlobalSettings>, ILocalizedTextService, IUmbracoMapper)

    Declaration
    public DictionaryController(ILogger<DictionaryController> logger, ILocalizationService localizationService, IBackOfficeSecurityAccessor backofficeSecurityAccessor, IOptionsSnapshot<GlobalSettings> globalSettings, ILocalizedTextService localizedTextService, IUmbracoMapper umbracoMapper)
    Parameters
    Type Name Description
    Microsoft.Extensions.Logging.ILogger<DictionaryController> logger
    ILocalizationService localizationService
    IBackOfficeSecurityAccessor backofficeSecurityAccessor
    Microsoft.Extensions.Options.IOptionsSnapshot<GlobalSettings> globalSettings
    ILocalizedTextService localizedTextService
    IUmbracoMapper umbracoMapper
    View Source

    DictionaryController(ILogger<DictionaryController>, ILocalizationService, IBackOfficeSecurityAccessor, IOptionsSnapshot<GlobalSettings>, ILocalizedTextService, IUmbracoMapper, IEntityXmlSerializer, IHostingEnvironment, PackageDataInstallation)

    Declaration
    [ActivatorUtilitiesConstructor]
    public DictionaryController(ILogger<DictionaryController> logger, ILocalizationService localizationService, IBackOfficeSecurityAccessor backofficeSecurityAccessor, IOptionsSnapshot<GlobalSettings> globalSettings, ILocalizedTextService localizedTextService, IUmbracoMapper umbracoMapper, IEntityXmlSerializer serializer, IHostingEnvironment hostingEnvironment, PackageDataInstallation packageDataInstallation)
    Parameters
    Type Name Description
    Microsoft.Extensions.Logging.ILogger<DictionaryController> logger
    ILocalizationService localizationService
    IBackOfficeSecurityAccessor backofficeSecurityAccessor
    Microsoft.Extensions.Options.IOptionsSnapshot<GlobalSettings> globalSettings
    ILocalizedTextService localizedTextService
    IUmbracoMapper umbracoMapper
    IEntityXmlSerializer serializer
    IHostingEnvironment hostingEnvironment
    PackageDataInstallation packageDataInstallation

    Methods

    View Source

    Create(Int32, String)

    Creates a new dictionary item

    Declaration
    [HttpPost]
    public ActionResult<int> Create(int parentId, string key)
    Parameters
    Type Name Description
    System.Int32 parentId

    The parent id.

    System.String key

    The key.

    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.ActionResult<System.Int32>

    The .

    View Source

    DeleteById(Int32)

    Deletes a data 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

    ExportDictionary(Int32, Boolean)

    Declaration
    public IActionResult ExportDictionary(int id, bool includeChildren = false)
    Parameters
    Type Name Description
    System.Int32 id
    System.Boolean includeChildren
    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.IActionResult
    View Source

    GetById(Guid)

    Gets a dictionary item by guid

    Declaration
    public ActionResult<DictionaryDisplay?> GetById(Guid id)
    Parameters
    Type Name Description
    Guid id

    The id.

    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.ActionResult<System.Nullable<DictionaryDisplay>>

    The . Returns a not found response when dictionary item does not exist

    View Source

    GetById(Int32)

    Gets a dictionary item by id

    Declaration
    public ActionResult<DictionaryDisplay?> GetById(int id)
    Parameters
    Type Name Description
    System.Int32 id

    The id.

    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.ActionResult<System.Nullable<DictionaryDisplay>>

    The . Returns a not found response when dictionary item does not exist

    View Source

    GetById(Udi)

    Gets a dictionary item by udi

    Declaration
    public ActionResult<DictionaryDisplay?> GetById(Udi id)
    Parameters
    Type Name Description
    Udi id

    The id.

    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.ActionResult<System.Nullable<DictionaryDisplay>>

    The . Returns a not found response when dictionary item does not exist

    View Source

    GetList()

    Retrieves a list with all dictionary items

    Declaration
    public IEnumerable<DictionaryOverviewDisplay> GetList()
    Returns
    Type Description
    IEnumerable<DictionaryOverviewDisplay>

    The .

    View Source

    ImportDictionary(String, Int32)

    Declaration
    public IActionResult ImportDictionary(string file, int parentId)
    Parameters
    Type Name Description
    System.String file
    System.Int32 parentId
    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.IActionResult
    View Source

    PostMove(MoveOrCopy)

    Changes the structure for dictionary items

    Declaration
    public IActionResult PostMove(MoveOrCopy move)
    Parameters
    Type Name Description
    MoveOrCopy move
    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.IActionResult
    View Source

    PostSave(DictionarySave)

    Saves a dictionary item

    Declaration
    public ActionResult<DictionaryDisplay?> PostSave(DictionarySave dictionary)
    Parameters
    Type Name Description
    DictionarySave dictionary

    The dictionary.

    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.ActionResult<System.Nullable<DictionaryDisplay>>

    The .

    View Source

    Upload(IFormFile)

    Declaration
    public ActionResult<DictionaryImportModel> Upload(IFormFile file)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Http.IFormFile file
    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.ActionResult<DictionaryImportModel>
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • DictionaryController(ILogger<DictionaryController>, ILocalizationService, IBackOfficeSecurityAccessor, IOptionsSnapshot<GlobalSettings>, ILocalizedTextService, IUmbracoMapper)
      • DictionaryController(ILogger<DictionaryController>, ILocalizationService, IBackOfficeSecurityAccessor, IOptionsSnapshot<GlobalSettings>, ILocalizedTextService, IUmbracoMapper, IEntityXmlSerializer, IHostingEnvironment, PackageDataInstallation)
    • Methods
      • Create(Int32, String)
      • DeleteById(Int32)
      • ExportDictionary(Int32, Boolean)
      • GetById(Guid)
      • GetById(Int32)
      • GetById(Udi)
      • GetList()
      • ImportDictionary(String, Int32)
      • PostMove(MoveOrCopy)
      • PostSave(DictionarySave)
      • Upload(IFormFile)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX