direct log diff
This commit is contained in:
parent
8e62767b51
commit
9f73a25ef4
|
@ -283,4 +283,20 @@ class Log extends Entity {
|
|||
|
||||
return $repository->approve( $this );
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* {@inheritDoc}
|
||||
* @see \Tainacan\Entities\Entity::diff()
|
||||
*/
|
||||
public function diff($which = 0)
|
||||
{
|
||||
$log = $this;
|
||||
if($which != 0) {
|
||||
$log = new self($which);
|
||||
}
|
||||
$value = $log->get_value();
|
||||
$old = $log->get_old_value();
|
||||
return $value->diff($old);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue