PHP 클래스 Ublaboo\DataGrid\Column\Column

상속: extends Ublaboo\DataGrid\Object
파일 보기 프로젝트 열기: ublaboo/datagrid 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$align string
$default_hide boolean
$editable_callback callable
$editable_element array
$el_cache array Cached html elements
$header_escaping boolean
$renderer Renderer | null
$replacements array
$sort array
$sortable boolean | string
$sortable_callback null | callable
$sortable_reset_pagination boolean
$template string
$template_escaping boolean
$template_variables array

공개 메소드들

메소드 설명
addAttributes ( array $attrs ) : static Set attributes for both th and td element
applyReplacements ( Row $row ) : array Apply replacements
getAlign ( ) : string Get column alignment
getColumn ( ) : string
getColumnName ( ) : string Get column name
getColumnValue ( Row $row ) : mixed Get column value of row item
getDefaultHide ( )
getEditableCallback ( ) : callable Return callback that is used after inline editing
getEditableInputType ( ) : array [getEditableInputType description]
getElementPrototype ( string $tag, string $key = NULL, Row $row = NULL ) : Nette\Utils\Html Get th/td column element
getName ( ) : string
getRenderer ( ) : Renderer | null Return custom renderer callback
getSortNext ( ) : array What sorting will be applied after next click?
getSortableCallback ( ) : callable | null Get custom ORDER BY clause
getSortingColumn ( ) : string Get column to sort by
getTemplate ( ) : string Get column template path
getTemplateVariables ( ) : array Column can have variables that will be passed to custom template scope
hasAlign ( ) : boolean Has column some alignment?
hasReplacements ( ) : boolean Tell whether columns has replacements
hasSortNext ( ) : boolean
hasTemplate ( ) : boolean Tell whether column has its owntemplate
isEditable ( ) : boolean Is column editable?
isHeaderEscaped ( )
isSortAsc ( ) : boolean Is sorting ascending?
isSortable ( ) : boolean Tell whether column is sortable
isSortedBy ( ) : boolean Tell whether data source is sorted by this collumn
isTemplateEscaped ( )
render ( Row $row ) : mixed Render row item into template
setAlign ( string $align ) Set column alignment
setDefaultHide ( boolean $default_hide = TRUE ) : static
setEditableCallback ( callable $editable_callback ) Set callback that will be called after inline editing
setEditableInputType ( string $el_type, array $attrs = [] ) : static Element is by default textarea, user can change that
setEditableInputTypeSelect ( array $options = [] ) : static Change small inline edit input type to select
setFitContent ( boolean $fit_content = TRUE ) Set column content fit
setHeaderEscaping ( boolean $header_escaping = FALSE ) Should be column header escaped in latte?
setRenderer ( callable $renderer, $condition_callback = NULL ) Set renderer callback and (it may be optional - the condition callback will decide)
setRendererOnCondition ( callable $renderer, $condition_callback ) Set renderer callback just if condition is truthy
setReplacement ( array $replacements ) : Column Set column replacements
setSort ( array $sort ) Tell column his sorting options
setSortable ( boolean | string $sortable = TRUE ) Set column sortable or not
setSortableCallback ( callable $sortable_callback ) : static Set custom ORDER BY clause
setSortableResetPagination ( boolean $sortable_reset_pagination = TRUE ) : static Shoud be the pagination reseted after sorting?
setTemplate ( string $template, array $template_variables = [] ) Column may have its own template
setTemplateEscaping ( boolean $template_escaping = TRUE ) Should be column values escaped in latte?
sortableResetPagination ( ) : boolean Do reset pagination after sorting?
useRenderer ( Row $row ) : mixed Try to render item with custom renderer

보호된 메소드들

메소드 설명
getItemParams ( Row $row, array $params_list ) : array Get row item params (E.g. action may be called id => $item->id, name => $item->name, .

메소드 상세

addAttributes() 공개 메소드

Set attributes for both th and td element
public addAttributes ( array $attrs ) : static
$attrs array
리턴 static

applyReplacements() 공개 메소드

Apply replacements
public applyReplacements ( Row $row ) : array
$row Ublaboo\DataGrid\Row
리턴 array

getAlign() 공개 메소드

Get column alignment
public getAlign ( ) : string
리턴 string

getColumn() 공개 메소드

public getColumn ( ) : string
리턴 string

getColumnName() 공개 메소드

Get column name
public getColumnName ( ) : string
리턴 string

getColumnValue() 공개 메소드

Get column value of row item
public getColumnValue ( Row $row ) : mixed
$row Ublaboo\DataGrid\Row
리턴 mixed

getDefaultHide() 공개 메소드

public getDefaultHide ( )

getEditableCallback() 공개 메소드

Return callback that is used after inline editing
public getEditableCallback ( ) : callable
리턴 callable

getEditableInputType() 공개 메소드

[getEditableInputType description]
public getEditableInputType ( ) : array
리턴 array

getElementPrototype() 공개 메소드

Get th/td column element
public getElementPrototype ( string $tag, string $key = NULL, Row $row = NULL ) : Nette\Utils\Html
$tag string th|td
$key string
$row Ublaboo\DataGrid\Row
리턴 Nette\Utils\Html

getItemParams() 보호된 메소드

..)
protected getItemParams ( Row $row, array $params_list ) : array
$row Ublaboo\DataGrid\Row
$params_list array
리턴 array

getName() 공개 메소드

public getName ( ) : string
리턴 string

getRenderer() 공개 메소드

Return custom renderer callback
public getRenderer ( ) : Renderer | null
리턴 Renderer | null

getSortNext() 공개 메소드

What sorting will be applied after next click?
public getSortNext ( ) : array
리턴 array

getSortableCallback() 공개 메소드

Get custom ORDER BY clause
public getSortableCallback ( ) : callable | null
리턴 callable | null

getSortingColumn() 공개 메소드

Get column to sort by
public getSortingColumn ( ) : string
리턴 string

getTemplate() 공개 메소드

Get column template path
public getTemplate ( ) : string
리턴 string

getTemplateVariables() 공개 메소드

Column can have variables that will be passed to custom template scope
public getTemplateVariables ( ) : array
리턴 array

hasAlign() 공개 메소드

Has column some alignment?
public hasAlign ( ) : boolean
리턴 boolean [description]

hasReplacements() 공개 메소드

Tell whether columns has replacements
public hasReplacements ( ) : boolean
리턴 boolean

hasSortNext() 공개 메소드

public hasSortNext ( ) : boolean
리턴 boolean

hasTemplate() 공개 메소드

Tell whether column has its owntemplate
public hasTemplate ( ) : boolean
리턴 boolean

isEditable() 공개 메소드

Is column editable?
public isEditable ( ) : boolean
리턴 boolean

isHeaderEscaped() 공개 메소드

public isHeaderEscaped ( )

isSortAsc() 공개 메소드

Is sorting ascending?
public isSortAsc ( ) : boolean
리턴 boolean

isSortable() 공개 메소드

Tell whether column is sortable
public isSortable ( ) : boolean
리턴 boolean

isSortedBy() 공개 메소드

Tell whether data source is sorted by this collumn
public isSortedBy ( ) : boolean
리턴 boolean

isTemplateEscaped() 공개 메소드

public isTemplateEscaped ( )

render() 공개 메소드

Render row item into template
public render ( Row $row ) : mixed
$row Ublaboo\DataGrid\Row
리턴 mixed

setAlign() 공개 메소드

Set column alignment
public setAlign ( string $align )
$align string

setDefaultHide() 공개 메소드

public setDefaultHide ( boolean $default_hide = TRUE ) : static
$default_hide boolean
리턴 static

setEditableCallback() 공개 메소드

Set callback that will be called after inline editing
public setEditableCallback ( callable $editable_callback )
$editable_callback callable

setEditableInputType() 공개 메소드

Element is by default textarea, user can change that
public setEditableInputType ( string $el_type, array $attrs = [] ) : static
$el_type string
$attrs array
리턴 static

setEditableInputTypeSelect() 공개 메소드

Change small inline edit input type to select
public setEditableInputTypeSelect ( array $options = [] ) : static
$options array
리턴 static

setFitContent() 공개 메소드

Set column content fit
public setFitContent ( boolean $fit_content = TRUE )
$fit_content boolean

setHeaderEscaping() 공개 메소드

Should be column header escaped in latte?
public setHeaderEscaping ( boolean $header_escaping = FALSE )
$header_escaping boolean

setRenderer() 공개 메소드

Set renderer callback and (it may be optional - the condition callback will decide)
public setRenderer ( callable $renderer, $condition_callback = NULL )
$renderer callable

setRendererOnCondition() 공개 메소드

Set renderer callback just if condition is truthy
public setRendererOnCondition ( callable $renderer, $condition_callback )
$renderer callable

setReplacement() 공개 메소드

Set column replacements
public setReplacement ( array $replacements ) : Column
$replacements array
리턴 Column

setSort() 공개 메소드

Tell column his sorting options
public setSort ( array $sort )
$sort array

setSortable() 공개 메소드

Set column sortable or not
public setSortable ( boolean | string $sortable = TRUE )
$sortable boolean | string

setSortableCallback() 공개 메소드

Set custom ORDER BY clause
public setSortableCallback ( callable $sortable_callback ) : static
$sortable_callback callable
리턴 static

setSortableResetPagination() 공개 메소드

Shoud be the pagination reseted after sorting?
public setSortableResetPagination ( boolean $sortable_reset_pagination = TRUE ) : static
$sortable_reset_pagination boolean
리턴 static

setTemplate() 공개 메소드

Column may have its own template
public setTemplate ( string $template, array $template_variables = [] )
$template string
$template_variables array

setTemplateEscaping() 공개 메소드

Should be column values escaped in latte?
public setTemplateEscaping ( boolean $template_escaping = TRUE )
$template_escaping boolean

sortableResetPagination() 공개 메소드

Do reset pagination after sorting?

useRenderer() 공개 메소드

Try to render item with custom renderer
public useRenderer ( Row $row ) : mixed
$row Ublaboo\DataGrid\Row
리턴 mixed

프로퍼티 상세

$align 보호되어 있는 프로퍼티

protected string $align
리턴 string

$default_hide 보호되어 있는 프로퍼티

protected bool $default_hide
리턴 boolean

$editable_callback 보호되어 있는 프로퍼티

protected callable $editable_callback
리턴 callable

$editable_element 보호되어 있는 프로퍼티

protected array $editable_element
리턴 array

$el_cache 보호되어 있는 프로퍼티

Cached html elements
protected array $el_cache
리턴 array

$header_escaping 보호되어 있는 프로퍼티

protected bool $header_escaping
리턴 boolean

$renderer 보호되어 있는 프로퍼티

protected Renderer,Ublaboo\DataGrid\Column|NULL $renderer
리턴 Renderer | null

$replacements 보호되어 있는 프로퍼티

protected array $replacements
리턴 array

$sort 보호되어 있는 프로퍼티

protected array $sort
리턴 array

$sortable 보호되어 있는 프로퍼티

protected bool|string $sortable
리턴 boolean | string

$sortable_callback 보호되어 있는 프로퍼티

protected null|callable $sortable_callback
리턴 null | callable

$sortable_reset_pagination 보호되어 있는 프로퍼티

protected bool $sortable_reset_pagination
리턴 boolean

$template 보호되어 있는 프로퍼티

protected string $template
리턴 string

$template_escaping 보호되어 있는 프로퍼티

protected bool $template_escaping
리턴 boolean

$template_variables 보호되어 있는 프로퍼티

protected array $template_variables
리턴 array