Search Results for

    Show / Hide Table of Contents
    View Source

    Class MacrosController

    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
    [PluginController(null)]
    [Authorize(Policy = "TreeAccessMacros")]
    public class MacrosController : BackOfficeNotificationsController, IUmbracoFeature, IDiscoverable

    Constructors

    View Source

    MacrosController(ParameterEditorCollection, IMacroService, IShortStringHelper, IBackOfficeSecurityAccessor, ILogger<MacrosController>, IHostingEnvironment, IUmbracoMapper)

    Declaration
    public MacrosController(ParameterEditorCollection parameterEditorCollection, IMacroService macroService, IShortStringHelper shortStringHelper, IBackOfficeSecurityAccessor backofficeSecurityAccessor, ILogger<MacrosController> logger, IHostingEnvironment hostingEnvironment, IUmbracoMapper umbracoMapper)
    Parameters
    Type Name Description
    ParameterEditorCollection parameterEditorCollection
    IMacroService macroService
    IShortStringHelper shortStringHelper
    IBackOfficeSecurityAccessor backofficeSecurityAccessor
    Microsoft.Extensions.Logging.ILogger<MacrosController> logger
    IHostingEnvironment hostingEnvironment
    IUmbracoMapper umbracoMapper

    Methods

    View Source

    Create(String)

    Creates a new macro

    Declaration
    [HttpPost]
    public ActionResult<int> Create(string name)
    Parameters
    Type Name Description
    System.String name

    The name.

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

    The id of the created macro

    View Source

    DeleteById(Int32)

    Declaration
    [HttpPost]
    public IActionResult DeleteById(int id)
    Parameters
    Type Name Description
    System.Int32 id
    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.IActionResult
    View Source

    GetById(Guid)

    Declaration
    [HttpGet]
    public ActionResult<MacroDisplay> GetById(Guid id)
    Parameters
    Type Name Description
    System.Guid id
    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.ActionResult<MacroDisplay>
    View Source

    GetById(Int32)

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

    GetById(Udi)

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

    GetGroupedParameterEditors()

    Gets the available parameter editors grouped by their group.

    Declaration
    public IDictionary<string, IEnumerable<IDataEditor>> GetGroupedParameterEditors()
    Returns
    Type Description
    System.Collections.Generic.IDictionary<System.String, System.Collections.Generic.IEnumerable<IDataEditor>>

    The System.Net.Http.HttpResponseMessage.

    View Source

    GetParameterEditorByAlias(String)

    Get parameter editor by alias.

    Declaration
    public IDataEditor GetParameterEditorByAlias(string alias)
    Parameters
    Type Name Description
    System.String alias
    Returns
    Type Description
    IDataEditor

    The System.Net.Http.HttpResponseMessage.

    View Source

    GetParameterEditors()

    Gets the available parameter editors

    Declaration
    public ParameterEditorCollection GetParameterEditors()
    Returns
    Type Description
    ParameterEditorCollection

    The System.Net.Http.HttpResponseMessage.

    View Source

    GetPartialViews()

    Gets a list of available macro partials

    Declaration
    public IEnumerable<string> GetPartialViews()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<System.String>

    The System.Net.Http.HttpResponseMessage.

    View Source

    Save(MacroDisplay)

    Declaration
    [HttpPost]
    public ActionResult<MacroDisplay> Save(MacroDisplay macroDisplay)
    Parameters
    Type Name Description
    MacroDisplay macroDisplay
    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.ActionResult<MacroDisplay>
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • MacrosController(ParameterEditorCollection, IMacroService, IShortStringHelper, IBackOfficeSecurityAccessor, ILogger<MacrosController>, IHostingEnvironment, IUmbracoMapper)
    • Methods
      • Create(String)
      • DeleteById(Int32)
      • GetById(Guid)
      • GetById(Int32)
      • GetById(Udi)
      • GetGroupedParameterEditors()
      • GetParameterEditorByAlias(String)
      • GetParameterEditors()
      • GetPartialViews()
      • Save(MacroDisplay)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX