mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
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:
@@ -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 ?)
|
||||
|
||||
Reference in New Issue
Block a user