Skip to content

Commit

Permalink
adding some docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dogmatic69 committed May 24, 2012
1 parent f7ee7f8 commit f7c9de3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Core/Locks/Model/Lock.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,24 @@ class Lock extends LocksAppModel {
)
);

/**
* @brief disable the trash behavior as it is not required for this data
*
* @param bool $cascade if the delete should cascade
* @return AppModel::beforeSave()
*/
public function beforeDelete($cascade) {
$this->Behaviors->detach('Trashable');
return parent::beforeDelete($cascade);
}

/**
* @brief method to clear out locks that are stale
*
* The time can be configured via the configs plugin in the backend
*
* @return bool deleted or not, see Model::deleteAll()
*/
public function clearOldLocks() {
return $this->deleteAll(
array(
Expand Down

0 comments on commit f7c9de3

Please sign in to comment.