Skip to content

Commit

Permalink
Merge pull request #18 from KnpLabs/softdelete-tweak
Browse files Browse the repository at this point in the history
[softDeletable] added method to restore a deleted entity
  • Loading branch information
docteurklein committed Nov 22, 2012
2 parents bb9635d + cbfad48 commit 5eb3474
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Knp/DoctrineBehaviors/Model/SoftDeletable/SoftDeletable.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,15 @@ public function delete()
}

/**
* Checks whether the entity was been deleted.
* Restore entity by undeleting it
*/
public function restore()
{
$this->deletedAt = null;
}

/**
* Checks whether the entity has been deleted.
*
* @return Boolean
*/
Expand Down

0 comments on commit 5eb3474

Please sign in to comment.