Skip to content

Commit

Permalink
[softDeletable] added method to restore a deleted entity
Browse files Browse the repository at this point in the history
  • Loading branch information
inoryy committed Nov 22, 2012
1 parent bb9635d commit cbfad48
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 cbfad48

Please sign in to comment.