HumHub Documentation (unofficial)

SoftDeletable

Interface for classes which are deletable softly.

Tags
see
Content
since
1.14

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

Event an event that is triggered after a record is deleted softly.

EVENT_BEFORE_SOFT_DELETE

public mixed EVENT_BEFORE_SOFT_DELETE = 'beforeSoftDelete'
Tags
event

ModelEvent an event that is triggered before soft deleting a record. You may set [[ModelEvent::isValid]] to be false to stop the deletion.

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
since
1.14

beforeSoftDelete()

This method is invoked before soft deleting a record.

public beforeSoftDelete() : bool

The default implementation raises the [[EVENT_BEFORE_SOFT_DELETE]] event.

Tags
since
1.14
Return values
bool

whether the record should be deleted. Defaults to true.

hardDelete()

Deletes this content record immediately and permanently

public hardDelete() : bool
Tags
since
1.14
Return values
bool

softDelete()

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.

Tags
since
1.14
Return values
bool

        
On this page

Search results