Symbiote\GridFieldExtensions\GridFieldConfigurablePaginator
GridFieldConfigurablePaginator paginates the {@link GridField} list and adds controls to the bottom of the {@link GridField}. The page sizes are configurable.
Synopsis
class GridFieldConfigurablePaginator
extends GridFieldPaginator
{
- // members
- private static array $default_page_sizes = ;
- protected GridField $gridField;
- protected GridState_Data $gridFieldState;
- protected array $pageSizes = ;
- // methods
- public void __construct()
- public int getTotalRecords()
- public int getFirstShown()
- public $this setFirstShown()
- public int getLastShown()
- public int getTotalPages()
- public int getCurrentPage()
- public int getNextPage()
- public int getPreviousPage()
- public $this setPageSizes()
- public array getPageSizes()
- public ArrayList getPageSizesAsList()
- public GridField getGridField()
- public $this setGridField()
- public void handleAction()
- public void getManipulatedData()
- public ArrayData|null getTemplateParameters()
- public void getHTMLFragments()
- protected array getPagerArguments()
- public array getPagerActions()
- public void getActions()
- protected GridState_Data getGridPagerState()
Hierarchy
Extends
- SilverStripe\Forms\GridField\GridFieldPaginator
Uses
- SilverStripe\Core\Config\Configurable
Members
private
- $default_page_sizes
—
int
Specifies default page sizes
protected
- $gridField — SilverStripe\Forms\GridField\GridField
- $gridFieldState — SilverStripe\Forms\GridField\GridState_Data
- $pageSizes — array
Methods
protected
- getGridPagerState() — Gets the state from the current request's GridField and sets some default values on it
- getPagerArguments() — Returns an array containing the arguments for the pagination: total rows, pages, first record etc
public
- __construct()
- getActions()
- getCurrentPage() — Get the page currently active. This is calculated by adding one to the previous number of pages calculated via the "first shown record" position.
- getFirstShown() — Get the first shown record number
- getGridField() — Get the GridField used in this request
- getHTMLFragments()
- getLastShown() — Get the last shown record number
- getManipulatedData()
- getNextPage() — Get the next page number
- getPageSizes() — Get the sizes for the "Show x" dropdown
- getPageSizesAsList() — Gets a list of page sizes for use in templates as a dropdown
- getPagerActions() — Returns FormActions for each of the pagination actions, in an array
- getPreviousPage() — Get the previous page number
- getTemplateParameters() — Add the configurable page size options to the template data
- getTotalPages() — Get the total number of pages, given the current number of items per page. The total pages might be higher than <totalitems> / <itemsperpage> if the first shown record is half way through a standard page break point.
- getTotalRecords() — Get the total number of records in the list
- handleAction()
- setFirstShown() — Set the first shown record number. Will be stored in the state.
- setGridField() — Set the GridField so it can be used in other parts of the component during this request
- setPageSizes() — Set the page sizes to use in the "Show x" dropdown