Nova provides a robust events system for MODs to listen as actions happen throughout the system
$eventName
may be written as an array of segments or as a string with a .
separating each.
For example, these two $eventName
values are identical:
['location', 'view', 'output', 'main', 'index']
"location.view.output.main.index"
$eventCallback
, meanwhile, should accept a single $event
array parameter with data elements that will vary based on the event the listener is listening on.
Putting this all together, one could, for example, append “Hello World!” to the end of the main/index
view as follows:
$SECTION
- The view section, such as main or admin.$VIEW
- The view name, such as personnel_character or characters_bio.data
- The data object that will be sent to the view.$SECTION
- The view section, such as main or admin.$VIEW
- The view name, such as personnel_character or characters_bio.data
- The data object that was sent to the view to get the output.output
- The string that was produced after data was sent to the view.$ROUTERCLASS
- The controller class as resolved by the router.$ROUTERMETHOD
- The controller method as resolved by the router.data
- The data object that will be sent to the view.$ROUTERCLASS
- The controller class as resolved by the router.$ROUTERMETHOD
- The controller method as resolved by the router.data
- The data object that was sent to the template to get the output.output
- The string that was produced after data was sent to the template.$TABLE
- The name of the table into which the data will be written.$ROUTERCLASS
- The controller class as resolved by the router.$ROUTERMETHOD
- The controller method as resolved by the router.data
- The data to be inserted into the table.table
- The name of the table.$TABLE
- The name of the table into which the data will be written.$ROUTERCLASS
- The controller class as resolved by the router.$ROUTERMETHOD
- The controller method as resolved by the router.data
- The data to be inserted into the table.table
- The name of the table.where
- The where constraint defined in the update call.limit
- The limit constraint defined in the update call.$TABLE
- The name of the table into which the data will be written.$ROUTERCLASS
- The controller class as resolved by the router.$ROUTERMETHOD
- The controller method as resolved by the router.abort
- A boolean where, if set true, will prevent the delete operation from occuring.table
- The name of the table.where
- The where constraint defined in the delete call.limit
- The limit constraint defined in the delete call.resetData
- The reset_data parameter defined in the delete call.