2017 © Pedro Peláez
 

symfony-bundle admin-generator-bundle

Symfony AdminGeneratorBundle

image

idci/admin-generator-bundle

Symfony AdminGeneratorBundle

  • Tuesday, July 30, 2013
  • by idciconsulting
  • Repository
  • 4 Watchers
  • 2 Stars
  • 419 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

AdminGeneratorBundle

Add Symfony2 command to extends crud generator, (*1)

Requirements:

This bundle extends Sensio\Bundle\GeneratorBundle\Generator\DoctrineCrudGenerator And need php5-intl. The pagination is made with the pagerfanta bundle provide by white october, (*2)

Installation

To install this bundle please follow the next steps:, (*3)

First add the dependencies to your composer.json file:, (*4)

"require": {
    ...
    "pagerfanta/pagerfanta":           "dev-master",
    "white-october/pagerfanta-bundle": "dev-master",
    "idci/admin-generator-bundle":     "dev-master"
},

Then install the bundle with the command:, (*5)

php composer update

Enable the bundle in your application kernel:, (*6)

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
        new IDCI\Bundle\AdminGeneratorBundle\IDCIAdminGeneratorBundle(),
    );
}

As you can see, we use WhiteOctoberPagerFantaBundle to paginate list results. So you have to define the max_per_page parameter in your app/config/parameters.yml, (*7)

parameters:
    ...
    max_per_page:  25

Now, you have to install bootstrap. You can either:, (*8)

  • Download bootstrap at http://twitter.github.com/bootstrap/assets/bootstrap.zip
  • Then extract it into your /web directory which is at the root of the project.

Or, (*9)

Add bootstrap_source to your app/config/parameters.yml, (*10)

parameters:
    ...
    bootstrap_source:  http://twitter.github.com/bootstrap/assets/bootstrap.zip

Then run the following command to automatically install bootstrap assets in your web directory:, (*11)

php app/console admin-generator:install:bootstrap-files

Generate CRUD backoffice

A CRUD interface, already stylized with bootstrap, can be easily generated with this command., (*12)

php app/console doctrine:generate:crud:twitter-bootstrap

Then you have to:, (*13)

  • Indicate for which entity you want to generate a CRUD (Ex: MyBundle:Entity)
  • Indicate weather or not you want to generate "write actions" such as "new, update and delete"
  • Determine the format to use (annotation, yml, php, xml)
  • Determine the route prefix

Your CRUD entity is generated, as well as the layout., (*14)

Enjoy !, (*15)

The Versions

30/07 2013
30/07 2013

2.2.x-dev

2.2.9999999.9999999-dev

Symfony AdminGeneratorBundle

  Sources   Download

GPL-3.0+

The Requires

 

doctrine admin generator

30/07 2013
18/05 2013

2.1.x-dev

2.1.9999999.9999999-dev

Symfony AdminGeneratorBundle

  Sources   Download

GPL-3.0+

The Requires

 

doctrine admin generator

22/03 2013