PHP Class Grido\Components\Columns\Column

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

Protected Properties

Свойство 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

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode Description
applyReplacement ( mixed $value ) : mixed
formatValue ( mixed $value ) : mixed
getValue ( mixed $row ) : mixed

Method Details

__construct() public méthode

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

applyReplacement() protected méthode

protected applyReplacement ( mixed $value ) : mixed
$value mixed
Résultat mixed

formatValue() protected méthode

protected formatValue ( mixed $value ) : mixed
$value mixed
Résultat mixed

getCellPrototype() public méthode

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

getColumn() public méthode

public getColumn ( ) : mixed
Résultat mixed

getCustomRender() public méthode

public getCustomRender ( ) : mixed
Résultat mixed

getCustomRenderVariables() public méthode

public getCustomRenderVariables ( ) : array
Résultat array

getHeaderPrototype() public méthode

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

getLabel() public méthode

public getLabel ( ) : mixed
Résultat mixed

getSort() public méthode

public getSort ( ) : string
Résultat string

getValue() protected méthode

protected getValue ( mixed $row ) : mixed
$row mixed
Résultat mixed

hasFilter() public méthode

public hasFilter ( ) : boolean
Résultat boolean

isSortable() public méthode

public isSortable ( ) : boolean
Résultat boolean

render() public méthode

public render ( mixed $row ) : string
$row mixed
Résultat string

renderExport() public méthode

public renderExport ( mixed $row ) : string
$row mixed
Résultat string

setCellCallback() public méthode

public setCellCallback ( callback $callback ) : Column
$callback callback
Résultat Column

setColumn() public méthode

public setColumn ( mixed $column ) : Column
$column mixed
Résultat Column

setCustomRender() public méthode

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

setCustomRenderExport() public méthode

public setCustomRenderExport ( mixed $callback ) : Column
$callback mixed |
Résultat Column

setDefaultSort() public méthode

public setDefaultSort ( string $dir ) : Column
$dir string
Résultat Column

setFilterCheck() public méthode

public setFilterCheck ( ) : Grido\Components\Filters\Check
Résultat Grido\Components\Filters\Check

setFilterCustom() public méthode

public setFilterCustom ( Nette\Forms\IControl $formControl ) : Custom
$formControl Nette\Forms\IControl
Résultat Grido\Components\Filters\Custom

setFilterDate() public méthode

public setFilterDate ( ) : Grido\Components\Filters\Date
Résultat Grido\Components\Filters\Date

setFilterDateRange() public méthode

public setFilterDateRange ( ) : Grido\Components\Filters\DateRange
Résultat Grido\Components\Filters\DateRange

setFilterNumber() public méthode

public setFilterNumber ( ) : Grido\Components\Filters\Number
Résultat Grido\Components\Filters\Number

setFilterSelect() public méthode

public setFilterSelect ( array $items = NULL ) : Grido\Components\Filters\Select
$items array
Résultat Grido\Components\Filters\Select

setFilterText() public méthode

public setFilterText ( ) : Text
Résultat Grido\Components\Filters\Text

setReplacement() public méthode

public setReplacement ( array $replacement ) : Column
$replacement array array('pattern' => 'replacement')
Résultat Column

setSortable() public méthode

public setSortable ( boolean $sortable = TRUE ) : Column
$sortable boolean
Résultat 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
Résultat 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
Résultat string

$sortable protected_oe property

protected bool $sortable
Résultat boolean