PHP Class Ublaboo\DataGrid\DataSource\ArrayDataSource

Inheritance: implements Ublaboo\DataGrid\DataSource\IDataSource
Mostra file Open project: ublaboo/datagrid Class Usage Examples

Protected Properties

Property Type Description
$count integer
$data array

Public Methods

Method Description
__construct ( array $data_source )
applyFilterDateRange ( mixed $row, FilterDateRange $filter ) : void
applyFilterMultiSelect ( mixed $row, FilterMultiSelect $filter ) : void Filter by multi select value
applyFilterRange ( mixed $row, FilterRange $filter ) : void
filter ( array $filters ) : static Filter data
filterOne ( array $condition ) : ArrayDataSource 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
sort ( Sorting $sorting ) : static Sort data

Protected Methods

Method Description
applyFilter ( mixed $row, Filter $filter ) : mixed Apply fitler and tell whether row passes conditions or not
applyFilterDate ( mixed $row, FilterDate $filter ) : mixed Apply fitler date and tell whether row value matches or not

Method Details

__construct() public method

public __construct ( array $data_source )
$data_source array

applyFilter() protected method

Apply fitler and tell whether row passes conditions or not
protected applyFilter ( mixed $row, Filter $filter ) : mixed
$row mixed
$filter Ublaboo\DataGrid\Filter\Filter
return mixed

applyFilterDate() protected method

Apply fitler date and tell whether row value matches or not
protected applyFilterDate ( mixed $row, FilterDate $filter ) : mixed
$row mixed
$filter Ublaboo\DataGrid\Filter\FilterDate
return mixed

applyFilterDateRange() public method

public applyFilterDateRange ( mixed $row, FilterDateRange $filter ) : void
$row mixed
$filter Ublaboo\DataGrid\Filter\FilterDateRange
return void

applyFilterMultiSelect() public method

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

applyFilterRange() public method

public applyFilterRange ( mixed $row, FilterRange $filter ) : void
$row mixed
$filter Ublaboo\DataGrid\Filter\FilterRange
return void

filter() public method

Filter data
public filter ( array $filters ) : static
$filters array
return static

filterOne() public method

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

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

sort() public method

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

Property Details

$count protected_oe property

protected int $count
return integer

$data protected_oe property

protected array $data
return array