Menu

## SoftDeletable

SoftDeletable.php : 12

Provides methods for deleting entities.

### Table of Contents

$deletedAt : mixed
delete() : mixed
  Deletes the entity.
getDeletedAt() : DateTime
  Returns when the entry got deleted.
isDeleted() : bool
  Returns true if this entity is soft deleted.
restore() : mixed
  Restores an entity back.
setDeletedAt() : mixed
  Sets deletedAt to a specific date.

### Properties

#### $deletedAt

SoftDeletable.php : 15
`private mixed $deletedAt`

##### Tags

Column

  (type="datetime", nullable=true)

### Methods

#### delete()

SoftDeletable.php : 21

Deletes the entity.

`public delete(EntityManagerInterface $em) : mixed`

##### Parameters

$em : EntityManagerInterface

##### Return values

mixed —

#### getDeletedAt()

SoftDeletable.php : 50

Returns when the entry got deleted.

`public getDeletedAt() : DateTime`

##### Return values

DateTime —

#### isDeleted()

SoftDeletable.php : 59

Returns true if this entity is soft deleted.

`public isDeleted() : bool`

##### Return values

bool —

#### restore()

SoftDeletable.php : 31

Restores an entity back.

`public restore(EntityManagerInterface $em) : mixed`

##### Parameters

$em : EntityManagerInterface

##### Return values

mixed —

#### setDeletedAt()

SoftDeletable.php : 41

Sets deletedAt to a specific date.

`public setDeletedAt([DateTime|null $deletedAt = null ]) : mixed`

##### Parameters

$deletedAt : DateTime|null = null

##### Return values

mixed —

## Search results