PHPackages                             gon-zoo82/soft-deleteable-extension-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. gon-zoo82/soft-deleteable-extension-bundle

ActiveSymfony-bundle

gon-zoo82/soft-deleteable-extension-bundle
==========================================

Provides extra functions to the soft deleteable listener of gedmo

1.4.1(7y ago)019PHPPHP &gt;=5.3.3 || &gt;=7.1.3

Since Mar 15Pushed 6y agoCompare

[ Source](https://github.com/GonZOO82/SoftDeleteableListenerExtensionBundle)[ Packagist](https://packagist.org/packages/gon-zoo82/soft-deleteable-extension-bundle)[ RSS](/packages/gon-zoo82-soft-deleteable-extension-bundle/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (14)Used By (0)

SoftDeleteableListenerExtensionBundle
=====================================

[](#softdeleteablelistenerextensionbundle)

Extensions to Gedmo's softDeleteable listener which has had this issue reported since 2012 : [doctrine-extensions/DoctrineExtensions#505](https://github.com/doctrine-extensions/DoctrineExtensions/issues/505).

Provides the `onSoftDelete` functionality to an association of a doctrine entity. This functionality behaves like the SQL `onDelete` function (when the owner side is deleted). *It will prevent Doctrine errors when a reference is soft-deleted.*

**Cascade delete the entity**

To (soft-)delete an entity when its parent record is soft-deleted :

```
 @Evence\onSoftDelete(type="CASCADE")

```

**Set reference to null (instead of deleting the entity)**

```
 @Evence\onSoftDelete(type="SET NULL")

```

**Replace reference by some property marked as successor (must be of same entity class)**

```
 @Evence\onSoftDelete(type="SUCCESSOR")

```

Entity example
--------------

[](#entity-example)

```
