Methods
-
start( data )
-
Description
Called at route startParameters
Name Type Description dataobject Name Type Attributes Default Description reqobject Request - See expressjs definition resobject Response - See expressjs definition transactionobject <optional> Database transaction. undefined by default, provide your own when necessary redirectnumber Redirection route when status is set idEntitynumber Id of source entity idNewStatusnumber Id of target status statusNamestring Status's name isAllowedboolean false Boolean to block status change. Set it to true to skip default verifications Details
-
beforeAllowedCheck( data )
-
Description
Called before calling `helpers.status.isAllowed()`Parameters
Name Type Description dataobject Name Type Attributes Default Description reqobject Request - See expressjs definition resobject Response - See expressjs definition transactionobject <optional> Database transaction. undefined by default, provide your own when necessary redirectnumber Redirection route when status is set idEntitynumber Id of source entity idNewStatusnumber Id of target status statusNamestring Status's name isAllowedboolean false Boolean to block status change. Set it to true to skip default verifications entityobject Entity on which status is to be set, with its current status included Details
-
beforeActionsExecution( data )
-
Description
Called before executing target status actions. Alter `data.actions` to add/remove actionsParameters
Name Type Description dataobject Name Type Attributes Default Description reqobject Request - See expressjs definition resobject Response - See expressjs definition transactionobject <optional> Database transaction. undefined by default, provide your own when necessary redirectnumber Redirection route when status is set idEntitynumber Id of source entity idNewStatusnumber Id of target status statusNamestring Status's name isAllowedboolean false Boolean to block status change. Set it to true to skip default verifications entityobject Entity on which status is to be set, with its current status included actionsArray.<object> Target status actions fetched from `helpers.status.getActions()` Details
-
beforeSetStatus( data )
-
Description
Called before setting target status using `helpers.status.setStatus()`Parameters
Name Type Description dataobject Name Type Attributes Default Description reqobject Request - See expressjs definition resobject Response - See expressjs definition transactionobject <optional> Database transaction. undefined by default, provide your own when necessary redirectnumber Redirection route when status is set idEntitynumber Id of source entity idNewStatusnumber Id of target status statusNamestring Status's name isAllowedboolean false Boolean to block status change. Set it to true to skip default verifications entityobject Entity on which status is to be set, with its current status included actionsArray.<object> Target status actions fetched from `helpers.status.getActions()` Details
-
beforeRedirect( data )
-
Description
Called before redirecting to `data.redirect`Parameters
Name Type Description dataobject Name Type Attributes Default Description reqobject Request - See expressjs definition resobject Response - See expressjs definition transactionobject <optional> Database transaction. undefined by default, provide your own when necessary redirectnumber Redirection route when status is set idEntitynumber Id of source entity idNewStatusnumber Id of target status statusNamestring Status's name isAllowedboolean false Boolean to block status change. Set it to true to skip default verifications entityobject Entity on which status is to be set, with its current status included actionsArray.<object> Target status actions fetched from `helpers.status.getActions()` Details