2017 © Pedro Peláez
 

symfony-bundle mongodb-odm-softdelete-bundle

Symfony2 Doctrine MongoDB SoftDelete Bundle

image

doctrine/mongodb-odm-softdelete-bundle

Symfony2 Doctrine MongoDB SoftDelete Bundle

  • Wednesday, May 9, 2012
  • by tacker
  • Repository
  • 9 Watchers
  • 12 Stars
  • 10,888 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 3 Open issues
  • 1 Versions
  • 4 % Grown

The README.md

Doctrine MongoDB SoftDelete Bundle

This bundle implements soft-deletion for Doctrine MongoDB ODM and Symfony2., (*1)

Installation (Symfony 2.0.x only)

1. Add the following to your deps file:
[doctrine-odm-softdelete]
    git=git://github.com/doctrine/mongodb-odm-softdelete.git

[DoctrineMongoDBSoftDeleteBundle]
    git=git://github.com/doctrine/mongodb-odm-softdelete-bundle.git
    target=bundles/Doctrine/Bundle/MongoDBSoftDeleteBundle
2. Run the vendors install script:
php bin/vendors install
3. Add the Doctrine\\ODM\\MongoDB\\SoftDelete namespace to app/autoload.php:
<?php
// ...
    $loader->registerNamespaces(array(
        // ...
        'Doctrine\\ODM\\MongoDB\\SoftDelete' => __DIR__ . '/../vendor/doctrine-odm-softdelete/lib',
4. Setup the bundle to load in app/appKernel.php:
<?php
// ...
        $bundles = array(
        // ...
            new Doctrine\Bundle\MongoDBSoftDeleteBundle\DoctrineMongoDBSoftDeleteBundle(),

Configuration

Add the following to config.yml to get started:, (*2)

doctrine_mongodb_softdelete:
    deleted_field_name: deletedAt

The Versions

09/05 2012