• Core
  • Infrastructure
  • Web
  • Extensions
Search Results for

    Show / Hide Table of Contents
    View Source

    Class TemplateController

    Inheritance
    System.Object
    Microsoft.AspNetCore.Mvc.ControllerBase
    UmbracoApiControllerBase
    UmbracoApiController
    UmbracoAuthorizedApiController
    UmbracoAuthorizedJsonController
    BackOfficeNotificationsController
    Namespace: Umbraco.Cms.Web.BackOffice.Controllers
    Assembly: Umbraco.Web.BackOffice.dll
    Syntax
    [PluginController("UmbracoApi")]
    [Authorize(Policy = "TreeAccessTemplates")]
    public class TemplateController : BackOfficeNotificationsController, IUmbracoFeature, IDiscoverable

    Constructors

    View Source

    TemplateController(IFileService, IUmbracoMapper, IShortStringHelper)

    Declaration
    public TemplateController(IFileService fileService, IUmbracoMapper umbracoMapper, IShortStringHelper shortStringHelper)
    Parameters
    Type Name Description
    IFileService fileService
    IUmbracoMapper umbracoMapper
    IShortStringHelper shortStringHelper
    View Source

    TemplateController(IFileService, IUmbracoMapper, IShortStringHelper, IDefaultViewContentProvider)

    Declaration
    [ActivatorUtilitiesConstructor]
    public TemplateController(IFileService fileService, IUmbracoMapper umbracoMapper, IShortStringHelper shortStringHelper, IDefaultViewContentProvider defaultViewContentProvider)
    Parameters
    Type Name Description
    IFileService fileService
    IUmbracoMapper umbracoMapper
    IShortStringHelper shortStringHelper
    IDefaultViewContentProvider defaultViewContentProvider

    Methods

    View Source

    DeleteById(Int32)

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

    GetAll()

    Get all templates

    Declaration
    public IEnumerable<EntityBasic>? GetAll()
    Returns
    Type Description
    System.Nullable<IEnumerable<EntityBasic>>
    View Source

    GetByAlias(String)

    Gets data type by alias

    Declaration
    public TemplateDisplay GetByAlias(string alias)
    Parameters
    Type Name Description
    System.String alias
    Returns
    Type Description
    TemplateDisplay
    View Source

    GetById(Guid)

    Gets the template json for the template guid

    Declaration
    public ActionResult<TemplateDisplay> GetById(Guid id)
    Parameters
    Type Name Description
    Guid id
    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.ActionResult<TemplateDisplay>
    View Source

    GetById(Int32)

    Gets the template json for the template id

    Declaration
    public ActionResult<TemplateDisplay> GetById(int id)
    Parameters
    Type Name Description
    System.Int32 id
    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.ActionResult<TemplateDisplay>
    View Source

    GetById(Udi)

    Gets the template json for the template udi

    Declaration
    public ActionResult<TemplateDisplay> GetById(Udi id)
    Parameters
    Type Name Description
    Udi id
    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.ActionResult<TemplateDisplay>
    View Source

    GetScaffold(Int32)

    Declaration
    public TemplateDisplay GetScaffold(int id)
    Parameters
    Type Name Description
    System.Int32 id
    Returns
    Type Description
    TemplateDisplay
    View Source

    PostSave(TemplateDisplay)

    Saves the data type

    Declaration
    public ActionResult<TemplateDisplay> PostSave(TemplateDisplay display)
    Parameters
    Type Name Description
    TemplateDisplay display
    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.ActionResult<TemplateDisplay>
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • TemplateController(IFileService, IUmbracoMapper, IShortStringHelper)
      • TemplateController(IFileService, IUmbracoMapper, IShortStringHelper, IDefaultViewContentProvider)
    • Methods
      • DeleteById(Int32)
      • GetAll()
      • GetByAlias(String)
      • GetById(Guid)
      • GetById(Int32)
      • GetById(Udi)
      • GetScaffold(Int32)
      • PostSave(TemplateDisplay)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX