PHP code example of spyrit / propel-datagrid-bundle
1. Go to this page and download the library: Download spyrit/propel-datagrid-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/ */
namespace Spyrit\PropelDatagridBundle\Datagrid\Demo;
use Spyrit\PropelDatagridBundle\Datagrid\PropelDatagrid;
class BookDatagrid extends PropelDatagrid
{
public function configureQuery()
{
return BookQuery::create();
}
public function getDefaultSortColumn()
{
return 'id';
}
public function getName()
{
return 'book';
}
public function configureFilter()
{
return [
'id' => [
'type' => IntegerType::class,
'options' => [
'label' => '#',
'
//...
public function configureQuery()
{
return BookQuery::create()
->joinWith('Author', \Criteria::LEFT_JOIN)
->joinWith('Publisher', \Criteria::LEFT_JOIN)
;
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.