PHP Class Ublaboo\DataGrid\ColumnsSummary

Datei anzeigen Open project: ublaboo/datagrid

Protected Properties

Property Type Description
$datagrid DataGrid
$format array
$rowCallback null | callable
$summary array

Public Methods

Method Description
__construct ( DataGrid $datagrid, array $columns, $rowCallback )
add ( Row $row )
render ( string $key ) : mixed
setFormat ( string $key, integer $decimals, string $dec_point = '.', string $thousands_sep = ' ' ) Set number format
someColumnsExist ( array $columns ) : boolean

Private Methods

Method Description
getValue ( Row $row, Column $column ) : boolean Get value from column using Row::getValue() or custom callback

Method Details

__construct() public method

public __construct ( DataGrid $datagrid, array $columns, $rowCallback )
$datagrid DataGrid
$columns array

add() public method

public add ( Row $row )
$row Row

render() public method

public render ( string $key ) : mixed
$key string
return mixed

setFormat() public method

Set number format
public setFormat ( string $key, integer $decimals, string $dec_point = '.', string $thousands_sep = ' ' )
$key string
$decimals integer
$dec_point string
$thousands_sep string

someColumnsExist() public method

public someColumnsExist ( array $columns ) : boolean
$columns array
return boolean

Property Details

$datagrid protected_oe property

protected DataGrid,Ublaboo\DataGrid $datagrid
return DataGrid

$format protected_oe property

protected array $format
return array

$rowCallback protected_oe property

protected NULL|callable $rowCallback
return null | callable

$summary protected_oe property

protected array $summary
return array