iikoFront Api V6 Code Reference
iikoFront Api V6 Code Reference
Resto.Front.Api.Extensions
PluginIntegrationServiceExtensions Class
PluginIntegrationServiceExtensions Methods
AddButton Method
AddButtonOnClosedOrderView Method
AddButtonOnPastOrderView Method

# PluginIntegrationServiceExtensions AddButton Method

Adds action button to display it in plugin menu. Button will be automatically removed on iikoFront restarts or you will dispose method's return value.

Namespace: Resto.Front.Api.Extensions
Assembly: Resto.Front.Api.V6 (in Resto.Front.Api.V6.dll) Version: 1ca4876affdd3bc5359a98b321fc115a647d2251
Syntax
C#
Copy

    public static IDisposable AddButton(
    	this IPluginIntegrationService service,
    	string caption,
    	Action<IViewManager, IReceiptPrinter> action
    )

#### Parameters

service
  Type: Resto.Front.Api
  IPluginIntegrationService
caption
  Type: System
  String
  Text to display on button in 'Additional screen' -> 'Plugins menu'."
action
  Type: System
  Action
  IViewManager, IReceiptPrinter
  Action to execute on button pressed.

#### Return Value

Type: IDisposable
You may dispose result to remove button.

#### Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IPluginIntegrationService. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

#### Reference

PluginIntegrationServiceExtensions Class
Resto.Front.Api.Extensions Namespace
IPluginIntegrationService
AddButton(Button)