register()
Home > @gooddata/sdk-ui-dashboard > IDashboardPluginContract_V1 > register
IDashboardPluginContract_V1.register() method
This function will be called before the dashboard initialization and rendering starts.
Signature:
register(ctx: DashboardContext, customize: IDashboardCustomizer, eventing: IDashboardEventHandling): void;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
ctx |
dashboard context into which this plugin was loaded | |
|
customize |
API through which you can register dashboard customizations; the customize API should not be used after the registration completes | |
|
eventing |
API through which plugin can add or remove domain event handlers or subscribe to infrastructural events; it is safe to hold onto the eventing API and use it at later points to add or remove event handlers |
Returns:
void
Remarks
At this point, the plugin can use:
- the
customizeAPI to add its contribution to the dashboard; modify how rendering is done, add custom content and so on - theeventingAPI to add domain event handlers or subscribe to infrastructural events emitted by the dashboard
Notes:
- The plugin code MAY hold onto the
eventingAPI and use it event after the registration is finished to ad-hoc add or remove event handlers. - The plugin code SHOULD NOT perform any customizations using thecustomizeAPI after its registration completes. All plugin customizations and contributions must be registered at this point. Trying to register additional customizations or contributions after the registration will be ignored.