Remove unusable

parent e5ee32e9
......@@ -42,7 +42,6 @@ class SoftDelete extends Behavior
public function events() {
return [
ActiveRecord::EVENT_BEFORE_DELETE => 'softDelete',
ActiveRecord::EVENT_BEFORE_FIND => 'filterDeleted'
];
}
......@@ -67,22 +66,6 @@ class SoftDelete extends Behavior
$event->isValid = false;
}
/**
* Set the attribute deleted
*
* @param Event $event
*/
public function filterDeleted($event) {
$attributes[1] = $this->statusAttribute;
$this->owner->$attributes[1] = $this->deletedValue;
// save record
$this->owner->save(false, $attributes);
//prevent real delete
$event->isValid = false;
}
/**
* Restore soft-deleted record
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment