SoftDeletable
in
Interface for classes which are deletable softly.
Tags
Table of Contents
Constants
- EVENT_AFTER_SOFT_DELETE = 'afterSoftDelete'
- EVENT_BEFORE_SOFT_DELETE = 'beforeSoftDelete'
Methods
- afterSoftDelete() : mixed
- This method is invoked after soft deleting a record.
- beforeSoftDelete() : bool
- This method is invoked before soft deleting a record.
- hardDelete() : bool
- Deletes this content record immediately and permanently
- softDelete() : bool
- Marks the record as deleted.
Constants
EVENT_AFTER_SOFT_DELETE
public
mixed
EVENT_AFTER_SOFT_DELETE
= 'afterSoftDelete'
Tags
EVENT_BEFORE_SOFT_DELETE
public
mixed
EVENT_BEFORE_SOFT_DELETE
= 'beforeSoftDelete'
Tags
Methods
afterSoftDelete()
This method is invoked after soft deleting a record.
public
afterSoftDelete() : mixed
The default implementation raises the [[EVENT_AFTER_SOFT_DELETE]] event.
Tags
beforeSoftDelete()
This method is invoked before soft deleting a record.
public
beforeSoftDelete() : bool
The default implementation raises the [[EVENT_BEFORE_SOFT_DELETE]] event.
Tags
Return values
bool —whether the record should be deleted. Defaults to true
.
hardDelete()
Deletes this content record immediately and permanently
public
hardDelete() : bool
Tags
Return values
boolsoftDelete()
Marks the record as deleted.
public
softDelete() : bool
Content which are marked as deleted will not longer returned in queries/stream/search.
A cron job will remove these content permanently.
If installed, such content can also be restored using the recycle-bin
module.