Methods
-
start( data )
-
Description
Called at route startParameters
Name Type Description data
object Name Type Attributes Default Description req
object Request - See expressjs definition res
object Response - See expressjs definition transaction
object <optional> Database transaction. undefined by default, provide your own when necessary redirect
number Redirection route when status is set idEntity
number Id of source entity idNewStatus
number Id of target status statusName
string Status's name isAllowed
boolean 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 data
object Name Type Attributes Default Description req
object Request - See expressjs definition res
object Response - See expressjs definition transaction
object <optional> Database transaction. undefined by default, provide your own when necessary redirect
number Redirection route when status is set idEntity
number Id of source entity idNewStatus
number Id of target status statusName
string Status's name isAllowed
boolean false Boolean to block status change. Set it to true to skip default verifications entity
object 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 data
object Name Type Attributes Default Description req
object Request - See expressjs definition res
object Response - See expressjs definition transaction
object <optional> Database transaction. undefined by default, provide your own when necessary redirect
number Redirection route when status is set idEntity
number Id of source entity idNewStatus
number Id of target status statusName
string Status's name isAllowed
boolean false Boolean to block status change. Set it to true to skip default verifications entity
object Entity on which status is to be set, with its current status included actions
Array.<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 data
object Name Type Attributes Default Description req
object Request - See expressjs definition res
object Response - See expressjs definition transaction
object <optional> Database transaction. undefined by default, provide your own when necessary redirect
number Redirection route when status is set idEntity
number Id of source entity idNewStatus
number Id of target status statusName
string Status's name isAllowed
boolean false Boolean to block status change. Set it to true to skip default verifications entity
object Entity on which status is to be set, with its current status included actions
Array.<object> Target status actions fetched from `helpers.status.getActions()` Details
-
beforeRedirect( data )
-
Description
Called before redirecting to `data.redirect`Parameters
Name Type Description data
object Name Type Attributes Default Description req
object Request - See expressjs definition res
object Response - See expressjs definition transaction
object <optional> Database transaction. undefined by default, provide your own when necessary redirect
number Redirection route when status is set idEntity
number Id of source entity idNewStatus
number Id of target status statusName
string Status's name isAllowed
boolean false Boolean to block status change. Set it to true to skip default verifications entity
object Entity on which status is to be set, with its current status included actions
Array.<object> Target status actions fetched from `helpers.status.getActions()` Details