PHP code example of gloomy / pager-bundle
1. Go to this page and download the library: Download gloomy/pager-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/ */
gloomy / pager-bundle example snippets php
//...
$filters = array( 'operator' => 'and',
'criteria' => array( array( 'field' => 'job', 'operator' => 'contains', 'value' => 'Director' ),
array( 'operator' => 'or',
'criteria' => array(
array( 'field' => 'firstname', 'operator' => 'contains', 'value' => 'y' ),
array( 'field' => 'moviesNb', 'operator' => 'less', 'value' => 30 ),
)
)
)
);
php
//...
/**
* @Template()
*/
public function crudAction()
{
return $this->get('gloomy.crud')->factory('MyBundle:MyEntity')->handle();
}
php
//...
/**
* @Template()
*/
public function dataGridAction()
{
return array('datagrid' => $this->get('gloomy.datagrid')->factory('MyBundle:MyEntity'));
}
php
//...
/**
* @Template()
*/
public function pagerAction()
{
return array('pager' => $this->get('gloomy.pager')->factory('MyBundle:MyEntity'));
}
php
//...
$bundles = array(
//...
new Gloomy\PagerBundle\GloomyPagerBundle(),
);