Doctrine2 ORM Admin - Documentation 2.0 2.1 master

2. Configuration »

« Doctrine ORM Admin Bundle

1. Installation

First install the Sonata Admin Bundle which provides Core functionalities. The EntityAudit is an optional history feature (https://github.com/simplethings/EntityAudit).

1.1. Download bundles

Add the following lines to the file deps:

[SonataDoctrineORMAdminBundle]
    git=http://github.com/sonata-project/SonataDoctrineORMAdminBundle.git
    target=/bundles/Sonata/DoctrineORMAdminBundle
    version=origin/2.0

# optional bundle
[EntityAudit]
    git=git://github.com/simplethings/EntityAudit.git
    target=/bundles/SimpleThings/EntityAudit

and run:

bin/vendors install

1.2. Configuration

Next, be sure to enable the bundles in your autoload.php and AppKernel.php files:

<?php
// app/AppKernel.php
public function registerBundles()
{
    return array(
        // ...
        new Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle(),
        new SimpleThings\EntityAudit\SimpleThingsEntityAuditBundle(),
        // ...
    );
}

// autoload.php
$loader->registerNamespaces(array(
    // ...
    'SimpleThings'      => __DIR__.'/../vendor/bundles',
    // ...
));

Found a typo? Something is wrong in this documentation? Just fork and edit it!