Fix missing notifications:
- Add namecache in enotify - Add "unset()" in notify repository for additional field "abort" - Add possibility for additional, non-saved fields in model
This commit is contained in:
@@ -48,9 +48,23 @@ abstract class BaseModel
|
||||
$this->originalData = $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Maps a data array (original/current) to a known field list of the chosen model
|
||||
*
|
||||
* This is useful to filter out additional attributes, which aren't part of the db-table (like readonly cached fields)
|
||||
*
|
||||
* @param array $data The data array to map to db-fields
|
||||
*
|
||||
* @return array the mapped data array
|
||||
*/
|
||||
protected function mapFields(array $data)
|
||||
{
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function getOriginalData()
|
||||
{
|
||||
return $this->originalData;
|
||||
return $this->mapFields($this->originalData);
|
||||
}
|
||||
|
||||
public function resetOriginalData()
|
||||
@@ -117,7 +131,7 @@ abstract class BaseModel
|
||||
|
||||
public function toArray()
|
||||
{
|
||||
return $this->data;
|
||||
return $this->mapFields($this->data);
|
||||
}
|
||||
|
||||
protected function checkValid()
|
||||
|
||||
Reference in New Issue
Block a user