PHP code example of prezent / crud-bundle
1. Go to this page and download the library: Download prezent/crud-bundle library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
prezent / crud-bundle example snippets
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)
;
}
}