2017 © Pedro Peláez
 

symfony-bundle crud-bundle

Opifer CRUD Bundle

image

opifer/crud-bundle

Opifer CRUD Bundle

  • Wednesday, December 9, 2015
  • by rvanlaarhoven
  • Repository
  • 10 Watchers
  • 3 Stars
  • 3,976 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 2 Open issues
  • 7 Versions
  • 3 % Grown

The README.md

Note: This bundle is not maintained anymore. Have a look at https://github.com/Abhoryo/APYDataGridBundle instead., (*1)

Build Status SensioLabsInsight, (*2)

CrudBundle

This bundle is still very much a work in progress, so BC-breaks will happen until the first stable release., (*3)

Installation

Add the bundle to your composer.json, (*4)

composer require opifer/crud-bundle dev-master

Register the necessary bundles in app/AppKernel.php, (*5)

public function registerBundles()
{
    // @todo reduce dependencies
    $bundles = array(
        ...
        new Braincrafted\Bundle\BootstrapBundle\BraincraftedBootstrapBundle(),
        new Genemu\Bundle\FormBundle\GenemuFormBundle(),
        new JMS\SerializerBundle\JMSSerializerBundle(),
        new Liuggio\ExcelBundle\LiuggioExcelBundle(),
        new Opifer\CrudBundle\OpiferCrudBundle(),
        new Opifer\RulesEngineBundle\OpiferRulesEngineBundle(),
        new Symfony\Cmf\Bundle\RoutingBundle\CmfRoutingBundle(),
        ...
    }
}

Using dynamic crud routing & views

This bundle ships with two custom routers. To register them, add them to the CmfRoutingBundle config., (*6)

cmf_routing:
    chain:
        routers_by_id:
            router.default: 100
            opifer.crud.crud_router: 50
            opifer.crud.api_router: 40

Update your config file app/config/config.yml, (*7)

opifer_crud:
    # Define a route prefix if necessary
    # Defaults to '/'
    route_prefix: /admin

    # Note: Changing the key values will break the routes pointing to that entity.
    # Make sure to fix wherever you point to that route.
    routes:
        # The key is the route part, the value is the related entity.
        users:  Acme\DemoBundle\Entity\User

After defining a route, you can visit the CRUD pages at the following URL's:, (*8)

  • http://localhost/app_dev.php/users
  • http://localhost/app_dev.php/users/new
  • http://localhost/app_dev.php/users/edit/:id

Documentation

Documentation, (*9)

The Versions