PHP code example of radek-baczynski / data-grid-bundle
1. Go to this page and download the library: Download radek-baczynski/data-grid-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/ */
radek-baczynski / data-grid-bundle example snippets
class CustomGrid extends Grid
{
public $myParameter;
}
$myCustomGrid = new CustomGrid();
$grid = $gridManager->getGrid($gridConfig, $request,$myCustomGrid);
// now the $grid object is an instance of CustomGrid (it
// is exactly the same object than $myCustomGrid, not cloned)
$gridConfig->addField('slug', array(
'label' => 'Mon slug',
'sortable' => false,
'visible' => true,
'filterable' => true,
'translatable' => true,
'formatValueCallback' => function($value) { return strtoupper($value); },
'autoEscape' => true,
'category' => null, // only used by you for checking this value in your events if you want to...
'nullIfNotExists' => false, // for leftJoin, if value is not defined, this can return null instead of an exception
));
php
$bundles = array(
...
new Kitpages\DataGridBundle\KitpagesDataGridBundle(),
);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.