2017 © Pedro Peláez
 

symfony-bundle soft-deleteable-extension-bundle

Provides exta functions to the soft deleteable listener of gedmo

image

evence/soft-deleteable-extension-bundle

Provides exta functions to the soft deleteable listener of gedmo

  • Friday, July 20, 2018
  • by RubenHarms
  • Repository
  • 3 Watchers
  • 26 Stars
  • 29,147 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 15 Forks
  • 4 Open issues
  • 12 Versions
  • 21 % Grown

The README.md

SoftDeleteableListenerExtensionBundle

Extensions to Gedmo's softDeleteable listener which has had this issue reported since 2012 : https://github.com/Atlantic18/DoctrineExtensions/issues/505., (*1)

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., (*2)

Cascade delete the entity, (*3)

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

 @Evence\onSoftDelete(type="CASCADE")

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

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

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

 @Evence\onSoftDelete(type="SUCCESSOR")

Entity example

``` php <?php, (*7)

namespace AppBundle\Entity;, (*8)

use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as Gedmo; use Evence\Bundle\SoftDeleteableExtensionBundle\Mapping\Annotation as Evence;, (*9)

/* * @ORM\Entity(repositoryClass="AppBundle\Entity\AdvertisementRepository") * @Gedmo\SoftDeleteable(fieldName="deletedAt") */ class Advertisement {, (*10)

...

/**
 * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Shop")
 * @ORM\JoinColumn(name="shop_id", referencedColumnName="id")
 * @Evence\onSoftDelete(type="CASCADE")
 */
private $shop;

...

}, (*11)


## Install **Install with composer:**

composer require evence/soft-deleteable-extension-bundle, (*12)


Add the bundle to `app/AppKernel.php`: ``` php # app/AppKernel.php $bundles = array( ... new Evence\Bundle\SoftDeleteableExtensionBundle\EvenceSoftDeleteableExtensionBundle(), );

The Versions

20/07 2018

dev-master

9999999-dev

Provides exta functions to the soft deleteable listener of gedmo

  Sources   Download

The Requires

 

The Development Requires

soft-deleteable

19/07 2018

1.3.1

1.3.1.0

Provides exta functions to the soft deleteable listener of gedmo

  Sources   Download

The Requires

 

The Development Requires

soft-deleteable

21/01 2018

dev-add-license-1

dev-add-license-1

Provides exta functions to the soft deleteable listener of gedmo

  Sources   Download

The Requires

 

The Development Requires

soft-deleteable

29/09 2017

1.3.0

1.3.0.0

Provides exta functions to the soft deleteable listener of gedmo

  Sources   Download

The Requires

 

The Development Requires

soft-deleteable

03/03 2017

1.2.3

1.2.3.0

Provides exta functions to the soft deleteable listener of gedmo

  Sources   Download

The Requires

 

The Development Requires

soft-deleteable

02/03 2017

1.2.2

1.2.2.0

Provides exta functions to the soft deleteable listener of gedmo

  Sources   Download

The Requires

 

The Development Requires

soft-deleteable

02/03 2017

1.2.1

1.2.1.0

Provides exta functions to the soft deleteable listener of gedmo

  Sources   Download

The Requires

 

The Development Requires

soft-deleteable

18/01 2017

1.2

1.2.0.0

Provides exta functions to the soft deleteable listener of gedmo

  Sources   Download

The Requires

 

The Development Requires

soft-deleteable

05/10 2016

1.1

1.1.0.0

Provides exta functions to the soft deleteable listener of gedmo

  Sources   Download

The Requires

 

The Development Requires

soft-deleteable

15/03 2016

1.0.1

1.0.1.0

Provides exta functions to the soft deleteable listener of gedmo

  Sources   Download

The Requires

 

The Development Requires

soft-deleteable

15/03 2016

1.0.0

1.0.0.0

Provides exta functions to the soft deleteable listener of gedmo

  Sources   Download

The Requires

 

The Development Requires

soft-deleteable

14/03 2016

1.0

1.0.0.0

Provides exta functions to the soft deleteable listener of gedmo

  Sources   Download

The Requires

 

The Development Requires

soft-deleteable