direct log diff

This commit is contained in:
Jacson Passold 2018-04-05 15:06:48 -03:00
parent 8e62767b51
commit 9f73a25ef4
1 changed files with 16 additions and 0 deletions

View File

@ -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);
}
}