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 NameEvent
Toolstation\Trolleys\Events\QuickTrolleyCreatedIt 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: SerializesModels trait for serializing model instances
  • Model: QuickTrolley from Toolstation\Trolleys\Models

Properties

  • $quickTrolley: The QuickTrolley instance associated with the event.

Constructor

  • __construct(QuickTrolley $quickTrolley): Initializes the event with a QuickTrolley instance.

Notes

  • This event is used to handle actions that should occur when a QuickTrolley is created. For example, it can be used to trigger additional processes or notifications related to the creation of a QuickTrolley.
  • The event uses the SerializesModels trait to ensure that the model instance is properly serialized and unserialized when the event is dispatched or queued.

Copyright © 2026