/** * Assigns the listeners to the table's event dispatcher. * * If you want to customise the events registered to the dispatcher you should override this method. A standard set * of listeners is supplied with this class and registered by default. * * @return void * * @since 4.0 */ public function attachListenersToDispatcher() { // Get the dispatcher $dispatcher = $this->table->getDispatcher(); // Assign the listeners to the dispatcher $dispatcher->addListener('onBeforeLoad', [$this, 'onBeforeLoadListener']); $dispatcher->addListener('onAfterLoad', [$this, 'onAfterLoadListener']); $dispatcher->addListener('onBeforeStore', [$this, 'onBeforeStoreListener']); $dispatcher->addListener('onAfterStore', [$this, 'onAfterStoreListener']); }