Trolleys
Events
Overview of WHAM Customer Events
The Toolstation\Trolleys\Events namespace features events essential for managing trolleys within the Toolstation application. The QuickTrolleyCreated event, for instance, is triggered whenever a new QuickTrolley instance is created, notifying the system of new trolley additions and enabling effective record management. These events ensure that trolley-related actions are tracked and handled promptly, maintaining accuracy and responsiveness throughout the trolley lifecycle.
The trolley module fires the following events.
| Class Name | Event |
|---|---|
Toolstation\Trolleys\Events\QuickTrolleyCreated | It is triggered when a new QuickTrolley instance is created. |
QuickTrolleyCreated Event
The QuickTrolleyCreated class is an event in the Toolstation\Trolleys\Events namespace. It is triggered when a new QuickTrolley instance is created.
Data
- Namespace:
Toolstation\Trolleys\Events - Uses:
SerializesModelstrait for serializing model instances - Model:
QuickTrolleyfromToolstation\Trolleys\Models
Properties
$quickTrolley: TheQuickTrolleyinstance associated with the event.
Constructor
__construct(QuickTrolley $quickTrolley): Initializes the event with aQuickTrolleyinstance.
Notes
- This event is used to handle actions that should occur when a
QuickTrolleyis created. For example, it can be used to trigger additional processes or notifications related to the creation of aQuickTrolley. - The event uses the
SerializesModelstrait to ensure that the model instance is properly serialized and unserialized when the event is dispatched or queued.