PHP Class Ublaboo\DataGrid\DataSource\NetteDatabaseTableDataSource

Inheritance: extends FilterableDataSource, implements Ublaboo\DataGrid\DataSource\IDataSource
ファイルを表示 Open project: ublaboo/datagrid

Protected Properties

Property Type Description
$data array
$data_source Nette\Database\Table\Selection
$primary_key string

Public Methods

Method Description
__construct ( Selection $data_source, string $primary_key )
applyFilterDate ( FilterDate $filter ) : void Filter by date
applyFilterDateRange ( FilterDateRange $filter ) : void Filter by date range
applyFilterMultiSelect ( FilterMultiSelect $filter ) : void Filter by multi select value
applyFilterRange ( FilterRange $filter ) : void Filter by range
applyFilterSelect ( FilterSelect $filter ) : void Filter by select value
applyFilterText ( FilterText $filter ) : void Filter by keyword
filterOne ( array $condition ) : static Filter data - get one row
getCount ( ) : integer Get count of data
getData ( ) : array Get the data
limit ( integer $offset, integer $limit ) : static Apply limit and offset on data
processAggregation ( callable $aggregationCallback ) : void
sort ( Sorting $sorting ) : static Sort data

Method Details

__construct() public method

public __construct ( Selection $data_source, string $primary_key )
$data_source Nette\Database\Table\Selection
$primary_key string

applyFilterDate() public method

Filter by date
public applyFilterDate ( FilterDate $filter ) : void
$filter Ublaboo\DataGrid\Filter\FilterDate
return void

applyFilterDateRange() public method

Filter by date range
public applyFilterDateRange ( FilterDateRange $filter ) : void
$filter Ublaboo\DataGrid\Filter\FilterDateRange
return void

applyFilterMultiSelect() public method

Filter by multi select value
public applyFilterMultiSelect ( FilterMultiSelect $filter ) : void
$filter Ublaboo\DataGrid\Filter\FilterMultiSelect
return void

applyFilterRange() public method

Filter by range
public applyFilterRange ( FilterRange $filter ) : void
$filter Ublaboo\DataGrid\Filter\FilterRange
return void

applyFilterSelect() public method

Filter by select value
public applyFilterSelect ( FilterSelect $filter ) : void
$filter Ublaboo\DataGrid\Filter\FilterSelect
return void

applyFilterText() public method

Filter by keyword
public applyFilterText ( FilterText $filter ) : void
$filter Ublaboo\DataGrid\Filter\FilterText
return void

filterOne() public method

Filter data - get one row
public filterOne ( array $condition ) : static
$condition array
return static

getCount() public method

Get count of data
public getCount ( ) : integer
return integer

getData() public method

Get the data
public getData ( ) : array
return array

limit() public method

Apply limit and offset on data
public limit ( integer $offset, integer $limit ) : static
$offset integer
$limit integer
return static

processAggregation() public method

public processAggregation ( callable $aggregationCallback ) : void
$aggregationCallback callable
return void

sort() public method

Sort data
public sort ( Sorting $sorting ) : static
$sorting Ublaboo\DataGrid\Utils\Sorting
return static

Property Details

$data protected_oe property

protected array $data
return array

$data_source protected_oe property

protected Selection,Nette\Database\Table $data_source
return Nette\Database\Table\Selection

$primary_key protected_oe property

protected string $primary_key
return string