PHP Class Grido\Components\Columns\Column

Author: Petr Bugyík
Inheritance: extends Grido\Components\Component
Exibir arquivo Open project: o5/grido Class Usage Examples

Protected Properties

Property Type Description
$cellCallback returns td html element; function($row, Html $td)
$cellPrototype html tag
$column string
$customRender custom rendering
$customRenderExport custom export rendering
$customRenderVariables custom rendering template variables
$headerPrototype html tag
$replacements of arrays('pattern' => 'replacement')
$sort string
$sortable boolean

Public Methods

Method Description
__construct ( Grid $grid, string $name, string $label )
getCellPrototype ( mixed $row = NULL ) : Nette\Utils\Html Returns cell prototype ( html tag).
getColumn ( ) : mixed
getCustomRender ( ) : mixed
getCustomRenderVariables ( ) : array
getHeaderPrototype ( ) : Nette\Utils\Html Returns header cell prototype ( html tag).
getLabel ( ) : mixed
getSort ( ) : string
hasFilter ( ) : boolean
isSortable ( ) : boolean
render ( mixed $row ) : string
renderExport ( mixed $row ) : string
setCellCallback ( callback $callback ) : Column
setColumn ( mixed $column ) : Column
setCustomRender ( mixed $callback, array $variables = [] ) : Column
setCustomRenderExport ( mixed $callback ) : Column
setDefaultSort ( string $dir ) : Column
setFilterCheck ( ) : Grido\Components\Filters\Check
setFilterCustom ( Nette\Forms\IControl $formControl ) : Custom
setFilterDate ( ) : Grido\Components\Filters\Date
setFilterDateRange ( ) : Grido\Components\Filters\DateRange
setFilterNumber ( ) : Grido\Components\Filters\Number
setFilterSelect ( array $items = NULL ) : Grido\Components\Filters\Select
setFilterText ( ) : Text
setReplacement ( array $replacement ) : Column
setSortable ( boolean $sortable = TRUE ) : Column

Protected Methods

Method Description
applyReplacement ( mixed $value ) : mixed
formatValue ( mixed $value ) : mixed
getValue ( mixed $row ) : mixed

Method Details

__construct() public method

public __construct ( Grid $grid, string $name, string $label )
$grid Grido\Grid
$name string
$label string

applyReplacement() protected method

protected applyReplacement ( mixed $value ) : mixed
$value mixed
return mixed

formatValue() protected method

protected formatValue ( mixed $value ) : mixed
$value mixed
return mixed

getCellPrototype() public method

Returns cell prototype ( html tag).
public getCellPrototype ( mixed $row = NULL ) : Nette\Utils\Html
$row mixed
return Nette\Utils\Html

getColumn() public method

public getColumn ( ) : mixed
return mixed

getCustomRender() public method

public getCustomRender ( ) : mixed
return mixed

getCustomRenderVariables() public method

public getCustomRenderVariables ( ) : array
return array

getHeaderPrototype() public method

Returns header cell prototype ( html tag).
public getHeaderPrototype ( ) : Nette\Utils\Html
return Nette\Utils\Html

getLabel() public method

public getLabel ( ) : mixed
return mixed

getSort() public method

public getSort ( ) : string
return string

getValue() protected method

protected getValue ( mixed $row ) : mixed
$row mixed
return mixed

hasFilter() public method

public hasFilter ( ) : boolean
return boolean

isSortable() public method

public isSortable ( ) : boolean
return boolean

render() public method

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

renderExport() public method

public renderExport ( mixed $row ) : string
$row mixed
return string

setCellCallback() public method

public setCellCallback ( callback $callback ) : Column
$callback callback
return Column

setColumn() public method

public setColumn ( mixed $column ) : Column
$column mixed
return Column

setCustomRender() public method

public setCustomRender ( mixed $callback, array $variables = [] ) : Column
$callback mixed callback or string for name of template filename
$variables array - template variables
return Column

setCustomRenderExport() public method

public setCustomRenderExport ( mixed $callback ) : Column
$callback mixed |
return Column

setDefaultSort() public method

public setDefaultSort ( string $dir ) : Column
$dir string
return Column

setFilterCheck() public method

public setFilterCheck ( ) : Grido\Components\Filters\Check
return Grido\Components\Filters\Check

setFilterCustom() public method

public setFilterCustom ( Nette\Forms\IControl $formControl ) : Custom
$formControl Nette\Forms\IControl
return Grido\Components\Filters\Custom

setFilterDate() public method

public setFilterDate ( ) : Grido\Components\Filters\Date
return Grido\Components\Filters\Date

setFilterDateRange() public method

public setFilterDateRange ( ) : Grido\Components\Filters\DateRange
return Grido\Components\Filters\DateRange

setFilterNumber() public method

public setFilterNumber ( ) : Grido\Components\Filters\Number
return Grido\Components\Filters\Number

setFilterSelect() public method

public setFilterSelect ( array $items = NULL ) : Grido\Components\Filters\Select
$items array
return Grido\Components\Filters\Select

setFilterText() public method

public setFilterText ( ) : Text
return Grido\Components\Filters\Text

setReplacement() public method

public setReplacement ( array $replacement ) : Column
$replacement array array('pattern' => 'replacement')
return Column

setSortable() public method

public setSortable ( boolean $sortable = TRUE ) : Column
$sortable boolean
return Column

Property Details

$cellCallback protected_oe property

returns td html element; function($row, Html $td)
protected $cellCallback

$cellPrototype protected_oe property

html tag
protected $cellPrototype

$column protected_oe property

protected string $column
return string

$customRender protected_oe property

custom rendering
protected $customRender

$customRenderExport protected_oe property

custom export rendering
protected $customRenderExport

$customRenderVariables protected_oe property

custom rendering template variables
protected $customRenderVariables

$headerPrototype protected_oe property

html tag
protected $headerPrototype

$replacements protected_oe property

of arrays('pattern' => 'replacement')
protected $replacements

$sort protected_oe property

protected string $sort
return string

$sortable protected_oe property

protected bool $sortable
return boolean