All Projects → whiteoctober → WhiteOctoberAdminBundle

whiteoctober / WhiteOctoberAdminBundle

Licence: MIT License
A different take on an AdminBundle for Symfony2

Programming Languages

PHP
23972 projects - #3 most used programming language
CSS
56736 projects
HTML
75241 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to WhiteOctoberAdminBundle

eav-bundle
A Symfony bundle for basic EAV management
Stars: ✭ 19 (-77.11%)
Mutual labels:  symfony-bundle
hcaptcha-bundle
A Symfony 4+ bundle to bring hCaptcha into your forms
Stars: ✭ 15 (-81.93%)
Mutual labels:  symfony-bundle
EasyAuditBundle
A Symfony Bundle To Log Selective Events
Stars: ✭ 84 (+1.2%)
Mutual labels:  symfony-bundle
docusign-bundle
Symfony bundle to create electronic signatures with DocuSign
Stars: ✭ 27 (-67.47%)
Mutual labels:  symfony-bundle
routing-auto-bundle
Adding automatic route generating on top of the symfony cmf routing
Stars: ✭ 14 (-83.13%)
Mutual labels:  symfony-bundle
EzCoreExtraBundle
Extra features for eZ Platform (v1.x compatible with eZ Publish 5.4)
Stars: ✭ 29 (-65.06%)
Mutual labels:  symfony-bundle
LiipMultiplexBundle
[DEPRECATED] Symfony2 controller that allows calling multiple URL's in one request as well as JSON-ifying any controller
Stars: ✭ 12 (-85.54%)
Mutual labels:  symfony-bundle
KnpDisqusBundle
A Symfony bundle to fetch and render disqus comments via their API. Your SEO other-half will love it.
Stars: ✭ 62 (-25.3%)
Mutual labels:  symfony-bundle
BeelabUserBundle
👥 Simple user management for Symfony.
Stars: ✭ 17 (-79.52%)
Mutual labels:  symfony-bundle
health-check-bundle
A bundle that provides a simple /healthcheck route
Stars: ✭ 27 (-67.47%)
Mutual labels:  symfony-bundle
AutoFormBundle
Automate Symfony form building
Stars: ✭ 68 (-18.07%)
Mutual labels:  symfony-bundle
SonataTranslationBundle
SonataTranslationBundle
Stars: ✭ 72 (-13.25%)
Mutual labels:  symfony-bundle
mongodb-migrations-bundle
Symfony MongoDBMigrationsBundle
Stars: ✭ 21 (-74.7%)
Mutual labels:  symfony-bundle
LolautruchePaylineBundle
Symfony integration for Payline payment system
Stars: ✭ 15 (-81.93%)
Mutual labels:  symfony-bundle
time-ago-bundle
Provides a simple twig filter for expressing time difference in words.
Stars: ✭ 13 (-84.34%)
Mutual labels:  symfony-bundle
block-bundle
Extends the SonataBlockBundle to integrate with PHPCR ODM
Stars: ✭ 20 (-75.9%)
Mutual labels:  symfony-bundle
acl-bundle
Integrates the ACL Security component into Symfony applications.
Stars: ✭ 91 (+9.64%)
Mutual labels:  symfony-bundle
dataflow-bundle
Data processing framework inspired by PortPHP
Stars: ✭ 13 (-84.34%)
Mutual labels:  symfony-bundle
doctrine-json-odm
JSON Object-Document Mapping bundle for Symfony and Doctrine
Stars: ✭ 15 (-81.93%)
Mutual labels:  symfony-bundle
domain-event-bundle
Library to create the domain layer of your DDD application
Stars: ✭ 14 (-83.13%)
Mutual labels:  symfony-bundle

WhiteOctoberAdminBundle

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

Alternatives you might like to investigate instead:

Installation

You have to install this bundle as usual:

git submodule add git://github.com/whiteoctober/WhiteOctoberAdminBundle.git vendor/bundles/WhiteOctober/AdminBundle

You also have to install Pagerfanta with its bundle:

git submodule add git://github.com/whiteoctober/Pagerfanta.git vendor/pagerfanta

git submodule add git://github.com/whiteoctober/WhiteOctoberPagerfantaBundle.git vendor/bundles/WhiteOctober/PagerfantaBundle

Register namespaces in your autoload.php:

// app/autoload.php
$loader->registerNamespaces(array(
// ...
    '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:

_white_october_admin:
    resource: .
    type: white_october_admin

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

Here you go ! Pretty easy isn't it ?

Configuration

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
white_october_admin:
    data_managers:
        doctrine:
            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
white_october_admin:
    ...
    admins:
        - { 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

Example:

<?php

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()
{
    $this
        ->setName('Articles')
        ->setDataClass('MyBundle\Entity\Article')
        ->addActions(array(
            'doctrine.orm.crud',
        ))
        ->addFields(array(
            'title',
            'content',
            'isActive',
            // ...
        ))
    ;
}

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.

Actions

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.

Fields

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

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].