All Projects → doctrine → mongodb-odm-softdelete-bundle

doctrine / mongodb-odm-softdelete-bundle

Licence: other
Symfony2 bundle that integrates the Doctrine MongoDB ODM SoftDelete library.

Programming Languages

PHP
23972 projects - #3 most used programming language

Doctrine MongoDB SoftDelete Bundle

This bundle implements soft-deletion for Doctrine MongoDB ODM and Symfony2.

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:

doctrine_mongodb_softdelete:
    deleted_field_name: deletedAt
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].