File: src/plugin/components/pagination/init.php

Recommend this page to a friend!
  Classes of Ar Gabid  >  Universal PHP Data Grid  >  src/plugin/components/pagination/init.php  >  Download  
File: src/plugin/components/pagination/init.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Universal PHP Data Grid
Display and process data to edit database records
Author: By
Last change: Update of src/plugin/components/pagination/init.php
Date: 7 months ago
Size: 596 bytes
 

Contents

Class file image Download
<?php

use gdgrid\gd\plugin\components\pagination\Pagination;
use
gdgrid\gd\Grid;

/* @var \gdgrid\gd\plugin\GridPlugin $this */

$this->setConfig('pagination', [
   
'perPage' => 25,
   
'pageSize' => 10,
   
'totalCount' => 0,
   
'insert_before' => null,
   
'insert_after' => '</{tag}>',
]);

$this->fetchComponent('pagination', function(Pagination $plugin, Grid $grid)
{
   
$grid->bindLayout('{pagination}', [
       
$plugin->fetchPages()->render(),
       
$this->getConfig('pagination', 'insert_before'),
       
$this->getConfig('pagination', 'insert_after')
    ]);
});


For more information send a message to info at phpclasses dot org.