public function beforeSave(Table $table, $data, $pk_value) { // Don't save changes to the changes tables. if (in_array($table->getName(), ['changesets', 'changes'])) { return false; } // Open a changeset if required. $this->openChangeset($this->currentChangesetComment); // Get the current (i.e. soon-to-be-old) data for later use. $this->oldRecord = $table->getRecord($pk_value); }