Property | Type | Description | |
---|---|---|---|
$align | string | ||
$default_hide | boolean | ||
$editable_callback | callable | ||
$editable_element | array | ||
$el_cache | array | Cached html elements | |
$header_escaping | boolean | ||
$renderer | |||
$replacements | array | ||
$sort | array | ||
$sortable | boolean | string | ||
$sortable_callback | null | callable | ||
$sortable_reset_pagination | boolean | ||
$template | string | ||
$template_escaping | boolean | ||
$template_variables | array |
Method | Description | |
---|---|---|
addAttributes ( array $attrs ) : static | Set attributes for both th and td element | |
applyReplacements ( |
Apply replacements | |
getAlign ( ) : string | Get column alignment | |
getColumn ( ) : string | ||
getColumnName ( ) : string | Get column name | |
getColumnValue ( |
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, |
Get th/td column element | |
getName ( ) : string | ||
getRenderer ( ) : |
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 ( |
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 ) : |
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 ( |
Try to render item with custom renderer |
Method | Description | |
---|---|---|
getItemParams ( |
Get row item params (E.g. action may be called id => $item->id, name => $item->name, . |
public addAttributes ( array $attrs ) : static | ||
$attrs | array | |
return | static |
public applyReplacements ( |
||
$row | ||
return | array |
public getColumnValue ( |
||
$row | ||
return | mixed |
public getEditableCallback ( ) : callable | ||
return | callable |
public getEditableInputType ( ) : array | ||
return | array |
public getElementPrototype ( string $tag, string $key = NULL, |
||
$tag | string | th|td |
$key | string | |
$row | ||
return | Nette\Utils\Html |
protected getItemParams ( |
||
$row | ||
$params_list | array | |
return | array |
public getRenderer ( ) : |
||
return |
public getSortNext ( ) : array | ||
return | array |
public getSortableCallback ( ) : callable | null | ||
return | callable | null |
public getSortingColumn ( ) : string | ||
return | string |
public getTemplateVariables ( ) : array | ||
return | array |
public hasReplacements ( ) : boolean | ||
return | boolean |
public hasTemplate ( ) : boolean | ||
return | boolean |
public isSortable ( ) : boolean | ||
return | boolean |
public isSortedBy ( ) : boolean | ||
return | boolean |
public setDefaultHide ( boolean $default_hide = TRUE ) : static | ||
$default_hide | boolean | |
return | static |
public setEditableCallback ( callable $editable_callback ) | ||
$editable_callback | callable |
public setEditableInputType ( string $el_type, array $attrs = [] ) : static | ||
$el_type | string | |
$attrs | array | |
return | static |
public setEditableInputTypeSelect ( array $options = [] ) : static | ||
$options | array | |
return | static |
public setFitContent ( boolean $fit_content = TRUE ) | ||
$fit_content | boolean |
public setHeaderEscaping ( boolean $header_escaping = FALSE ) | ||
$header_escaping | boolean |
public setRenderer ( callable $renderer, $condition_callback = NULL ) | ||
$renderer | callable |
public setRendererOnCondition ( callable $renderer, $condition_callback ) | ||
$renderer | callable |
public setReplacement ( array $replacements ) : |
||
$replacements | array | |
return |
public setSortable ( boolean | string $sortable = TRUE ) | ||
$sortable | boolean | string |
public setSortableCallback ( callable $sortable_callback ) : static | ||
$sortable_callback | callable | |
return | static |
public setSortableResetPagination ( boolean $sortable_reset_pagination = TRUE ) : static | ||
$sortable_reset_pagination | boolean | |
return | static |
public setTemplate ( string $template, array $template_variables = [] ) | ||
$template | string | |
$template_variables | array |
public setTemplateEscaping ( boolean $template_escaping = TRUE ) | ||
$template_escaping | boolean |
public sortableResetPagination ( ) : boolean | ||
return | boolean |
public useRenderer ( |
||
$row | ||
return | mixed |
protected Renderer,Ublaboo\DataGrid\Column|NULL $renderer | ||
return |
protected bool $sortable_reset_pagination | ||
return | boolean |