N°2293 - API OnDBUpdate and AfterUpdate need modified fields and previous data

- add a getter for the protected property DBObject::$m_aChanges
This commit is contained in:
bruno DA SILVA
2020-01-07 15:05:29 +01:00
parent cda18b950e
commit 2043010aad
2 changed files with 20 additions and 2 deletions

View File

@@ -2396,6 +2396,24 @@ abstract class DBObject implements iDisplay
}
}
/**
* List the changed attributes that were persisted by an update.
*
* @see \DBObject::ListChanges() use DBObject::ListChanges() if your code is BEFORE the update
*
* @return array
*/
public function ListChangesUpdated()
{
if (empty($this->m_aChanges))
{
return array();
}
return $this->m_aChanges;
}
/**
* Whether or not an object was modified since last read from the DB
* (ie: does it differ from the DB ?)