Skip to content


Subversion checkout URL

You can clone with
Download ZIP
A different take on an AdminBundle for Symfony2
PHP CSS JavaScript
branch: master


WARNING!: This bundle is now deprecated and no further development will take place on it. Use at your own risk :-)


You have to install this bundle as usual:

git submodule add git:// vendor/bundles/WhiteOctober/AdminBundle

You also have to install Pagerfanta with its bundle:

git submodule add git:// vendor/pagerfanta

git submodule add git:// vendor/bundles/WhiteOctober/PagerfantaBundle

Register namespaces in your autoload.php:

// app/autoload.php
// ...
    'WhiteOctober' => __DIR__.'/../vendor/bundles',
    'Pagerfanta'   => __DIR__.'/../vendor/pagerfanta/src',
    // ...

Register bundles in your AppKernel class:

// app/AppKernel.php
public function registerBundles()
    return array(
        // ...
        new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
        new WhiteOctober\AdminBundle\WhiteOctoberAdminBundle(),

Add these lines to your app/config/routing.yml file:

    resource: .
    type: white_october_admin

    resource: "@WhiteOctoberAdminBundle/Resources/config/routing/admin.xml"

Here you go ! Pretty easy isn't it ?


Data managers

WhiteOctoberAdminBundle provides three data managers:

  • Doctrine ORM
  • Doctrine ODM
  • Mandango

You have to choose at least one of them. You can add your own.

Edit your app/config/config.yml file:

# app/config/config.yml
            orm:    true
            odm:    false
        mandango:   false

Set true for each data manager you want to load.

Next, you have to declare your admin classes:

# app/config/config.yml
        - { class: My\Bundle\Admin\MyClassAdmin }

Admin classes

An admin class must extend WhiteOctober\AdminBundle\Admin\Admin.

This bundle provides some admin classes for each data manager:

  • WhiteOctober\AdminBundle\DataManager\Doctrine\ORM\Admin\DoctrineORMAdmin
  • WhiteOctober\AdminBundle\DataManager\Doctrine\ODM\Admin\DoctrineODMAdmin
  • WhiteOctober\AdminBundle\DataManager\Mandango\Admin\MandangoAdmin



namespace My\Bundle\Admin;

use WhiteOctober\AdminBundle\DataManager\Doctrine\ORM\Admin\DoctrineORMAdmin;

class MyClassAdmin extends DoctrineORMAdmin
    protected function configure()


To finish, you have to define a comportment the configure() method.

protected function configure()
            // ...

You have to set a data class which can be your entity class with the setDataClass() method.

You also have to define actions (crud, create, list, edit, update, ...) in the configure() method.


Each data manager provides a set of actions:

  • CRUDActionCollection
  • CreateAction
  • DeleteAction
  • EditAction
  • ListAdmin
  • NewAction
  • UpdateAction

To use one of them, just add it by using the addAction() method.

Each action is named like: xxxxx.action where xxxxx is the data manager (mandango, doctrine.orm or doctrine.odm) and action is the lowered word before Action.


You should specify fields by using the addFields() method.

Something went wrong with that request. Please try again.