import DisplayCommand from 'devapt-core-browser/js/commands/display_command.js'
DisplayCommand
Extends:
Display command class.
Example:
API
->do():Promise - do display.
->undo():Promise - undo display and display history previous content.
Constructor Summary
Public Constructor | ||
public |
constructor(arg_runtime: object, arg_settings: object, arg_log_context: string): nothing Creates an instance of DisplayCommand. |
Member Summary
Public Members | ||
public |
|
Method Summary
Public Methods | ||
public |
Get route. |
|
public |
Get target route. |
|
public |
Check if command settings is valid. |
Private Methods | ||
private |
Do command. |
|
private |
Undo command. |
Inherited Summary
From class NameTypeSettingsLoggable | ||
public |
|
|
private |
_runtime: * |
|
private |
_settings: * |
|
private |
_ui: * |
|
public |
Get instance name. |
|
public |
get_router(): Router Get router. |
|
public |
Get runtime. |
|
public |
Get instance settings. |
|
public |
get_state_store(): Store Get runtime state store. |
|
public |
Get instance type. |
|
public |
Get UI. |
|
public |
Check if instance settings is valid. |
From class Command | ||
public |
|
|
public |
Do command. |
|
public |
Undo command. |
|
private |
Do command. |
|
private |
Undo command. |
Public Constructors
public constructor(arg_runtime: object, arg_settings: object, arg_log_context: string): nothing source
Creates an instance of DisplayCommand.
A DisplayCommand configuration is a simple object with:
Common attributes:
- name:string - command unique name.
- type:string - type of commnand from command factory known types list (example: display).
- label:string - displayable short descriptive string.
- url or route:string : route to display content.
Middleware route attributes:
- middleware:string - middleware name to call on server side.
Browser route attributes:
- view:string - view name to render on browser side.
- menubar:string - menubar name to render on browser side (optional).
Override:
Command#constructorReturn:
nothing |
Public Methods
public is_valid(): boolean source
Check if command settings is valid.