View Source
Class MacrosController
The API controller used for editing dictionary items
Inheritance
System.Object
Microsoft.AspNetCore.Mvc.ControllerBase
Assembly: Umbraco.Web.BackOffice.dll
Syntax
[PluginController("UmbracoApi")]
[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
Methods
View Source
Create(String)
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 |
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 |
IDictionary<System.String, IEnumerable<IDataEditor>> |
The .
|
View Source
GetParameterEditorByAlias(String)
Get parameter editor by alias.
Declaration
public IDataEditor GetParameterEditorByAlias(string alias)
Parameters
Type |
Name |
Description |
System.String |
alias |
|
Returns
View Source
GetParameterEditors()
Gets the available parameter editors
Declaration
public ParameterEditorCollection GetParameterEditors()
Returns
View Source
GetPartialViews()
Gets a list of available macro partials
Declaration
public IEnumerable<string> GetPartialViews()
Returns
Type |
Description |
IEnumerable<System.String> |
The .
|
View Source
Save(MacroDisplay)
Declaration
[HttpPost]
public ActionResult<MacroDisplay> Save(MacroDisplay macroDisplay)
Parameters
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.ActionResult<MacroDisplay> |
|