Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 833 Bytes

README.md

File metadata and controls

30 lines (24 loc) · 833 Bytes

prezent/crud-bundle

Build Status

Easy CRUD for Symfony

namespace AppBundle\Controller;

use AppBundle\Entity\Product;
use AppBundle\Form\Type\ProductType;
use AppBundle\Grid\Type\ProductGridType;
use Prezent\CrudBundle\Controller\CrudController;
use Prezent\CrudBundle\Model\Configuration;

class ProductController extends CrudController
{
    protected function configure(Request $request, Configuration $config)
    {
        $config
            ->setEntityClass(Product::class)
            ->setFormType(ProductType::class)
            ->setGridType(ProductGridType::class)
        ;
    }
}

The documentation can be found in Resources/doc