Property | Type | Description | |
---|---|---|---|
$default_filter | array | ||
$default_filter_use_on_reset | boolean | ||
$default_sort | array | ||
$default_sort_use_on_reset | boolean | ||
$filter | array | ||
$form_method | string | Default form method | |
$icon_prefix | string | ||
$onColumnAdd | callable[] | ||
$onExport | callable[] | ||
$onFiltersAssabled | callable[] | ||
$onRedraw | callable[] | ||
$onRender | callable[] | ||
$page | integer | ||
$per_page | integer | string | ||
$sort | array | ||
$strict_entity_property | boolean | When set to TRUE, datagrid throws an exception when tring to get related entity within join and entity does not exist | |
$strict_session_filter_values | boolean | When set to TRUE, datagrid throws an exception when tring to set filter value, that does not exist (select, multiselect, etc) |
Method | Description | |
---|---|---|
__construct ( Nette\ComponentModel\IContainer $parent = NULL, string $name = NULL ) | ||
addAction ( string $key, string $name, string $href = NULL, array $params = NULL ) : |
Create action | |
addActionCallback ( string $key, string $name, $callback = NULL ) : |
Create action callback | |
addColumnCallback ( string $key, callable $callback ) : void | ||
addColumnDateTime ( string $key, string $name, string | null $column = NULL ) : |
Add column with date formating | |
addColumnLink ( string $key, string $name, $href = NULL, string | null $column = NULL, array $params = NULL ) : |
Add column with link | |
addColumnNumber ( string $key, string $name, string | null $column = NULL ) : |
Add column with possible number formating | |
addColumnStatus ( string $key, string $name, string | null $column = NULL ) : |
Add column status | |
addColumnText ( string $key, string $name, string | null $column = NULL ) : Column\ColumnText | Add text column with no other formating | |
addExportCallback ( string $text, callable $callback, boolean $filtered = FALSE ) : |
Add export of type callback | |
addExportCsv ( string $text, string $csv_file_name, string | null $output_encoding = NULL, string | null $delimiter = NULL, boolean $include_bom = FALSE ) : |
Add already implemented csv export | |
addExportCsvFiltered ( string $text, string $csv_file_name, string | null $output_encoding = NULL, string | null $delimiter = NULL, boolean $include_bom = FALSE ) : |
Add already implemented csv export, but for filtered data | |
addFilterDate ( string $key, string $name, string $column = NULL ) : |
Add datepicker filter | |
addFilterDateRange ( string $key, string $name, string $column = NULL, $name_second = '-' ) : |
Add datepicker filter (from - to) | |
addFilterMultiSelect ( string $key, string $name, array $options, string $column = NULL ) : |
Add multi select box filter | |
addFilterRange ( string $key, string $name, string $column = NULL, $name_second = '-' ) : |
Add range filter (from - to) | |
addFilterSelect ( string $key, string $name, array $options, string $column = NULL ) : |
Add select box filter | |
addFilterText ( string $key, string $name, array | string $columns = NULL ) : |
Add filter fot text search | |
addGroupAction ( string $title, array $options = [] ) : |
Alias for add group select action | |
addGroupSelectAction ( string $title, array $options = [] ) : |
Add group action (select box) | |
addGroupTextAction ( string $title ) : |
Add group action (text input) | |
addGroupTextareaAction ( string $title ) : |
Add group action (textarea) | |
addInlineAdd ( ) : |
||
addInlineEdit ( $primary_where_column = NULL ) : |
||
addMultiAction ( string $key, $name ) | ||
addToolbarButton ( string $href, string $text = '', array $params = [] ) : |
Add toolbar button | |
allowRowsAction ( string $key, callable $condition ) : void | ||
allowRowsGroupAction ( callable $condition ) : void | ||
allowRowsInlineEdit ( callable $condition ) : void | ||
assableFilters ( ) : |
Fill array of Filter\Filter[] with values from $this->filter persistent parameter Fill array of Column\Column[] with values from $this->sort persistent parameter | |
attached ( $presenter ) : void | {inheritDoc} | |
canHideColumns ( ) : boolean | Can datagrid hide colums? | |
createComponentFilter ( ) : Nette\Application\UI\Form | FilterAndGroupAction form factory | |
createComponentPaginator ( ) : |
Paginator factory | |
deleteSessionData ( $key ) : void | Delete session data | |
deleteSesssionData ( $key ) : void | Delete session data | |
filterSucceeded ( Nette\Application\UI\Form $form ) : void | Set $this->filter values after filter form submitted | |
findDefaultFilter ( ) : void | User may set default filter, find it | |
findDefaultPerPage ( ) : void | User may set default "items per page" value, apply it | |
findDefaultSort ( ) : void | User may set default sorting, apply it | |
findSessionValues ( ) : void | Try to restore session stuff | |
getAction ( string $key ) : |
Get existing action | |
getColumn ( string $key ) : |
Return existing column | |
getColumnCallback ( string $key ) : callable | null | ||
getColumns ( ) : Column\IColumn[] | Get set of set columns | |
getColumnsCount ( ) : integer | Get count of columns | |
getColumnsSummary ( ) : |
||
getColumnsVisibility ( ) | ||
getDataSource ( ) : Ublaboo\DataGrid\DataSource\IDataSource | null | ||
getFilter ( string $key ) : |
Get defined filter | |
getFilterSubmitButton ( ) : |
Submit button when no auto-submitting is used | |
getGroupActionCollection ( ) : |
Get collection of all group actions | |
getInlineAdd ( ) : |
||
getInlineEdit ( ) : |
||
getItemDetailForm ( ) : |
||
getItemsDetail ( ) : array | Get items detail parameters | |
getItemsPerPageList ( ) : array | Get associative array of items_per_page_list | |
getOriginalTemplateFile ( ) : string | Get DataGrid original template file | |
getPaginator ( ) : null | |
Return current paginator class | |
getParent ( ) : Nette\Application\UI\PresenterComponent | ||
getPerPage ( ) : integer | Get parameter per_page | |
getPrimaryKey ( ) : string | Get primary key of datagrid data source | |
getRowCondition ( string $name, string | null $key = NULL ) : boolean | callable | ||
getSessionData ( string $key = NULL, $default_value = NULL ) : mixed | Get session data if functionality is enabled | |
getSessionSectionName ( ) : string | Find some unique session key name | |
getSortNext ( |
||
getSortableHandler ( ) : string | Return sortable handle name | |
getSortableParentPath ( ) : strign | ||
getTemplateFile ( ) : static | Get DataGrid template file | |
getTranslator ( ) : Nette\Localization\ITranslator | Get translator for datagrid | |
handleActionCallback ( $__key, $__id ) | ||
handleChangeStatus ( string $id, string $key, string $value ) : void | Handler for column status | |
handleEdit ( mixed $id, mixed $key ) : void | Handler for inline editing | |
handleExport ( integer $id ) : void | Handler for export | |
handleGetChildren ( integer $parent ) : void | Handler for getting children of parent item (e.g. category) | |
handleGetItemDetail ( mixed $id ) : void | Handler for getting item detail | |
handleHideColumn ( string $column ) : void | Notice datagrid to not display particular columns | |
handleInlineEdit ( mixed $id ) : void | ||
handlePage ( integer $page ) : void | Handler for changind page (just refresh site with page as persistent paramter set) | |
handleRefreshState ( ) : void | Simply refresh url | |
handleResetColumnFilter ( string $key ) : void | ||
handleResetFilter ( ) : void | Handler for reseting the filter | |
handleShowAllColumns ( ) : void | Tell datagrid to display all columns | |
handleShowColumn ( string $column ) : void | Reveal particular column | |
handleShowDefaultColumns ( ) : void | Tell datagrid to display default columns | |
handleSort ( array $sort ) : void | Handler for sorting | |
hasAutoSubmit ( ) : boolean | ||
hasCollapsibleOuterFilters ( ) : boolean | ||
hasColumnReset ( ) : boolean | ||
hasColumnsSummary ( ) : boolean | Will datagrid show summary in the end? | |
hasGroupActions ( ) : boolean | Has datagrid some group actions? | |
hasOuterFilterRendering ( ) : boolean | Are datagrid filters rendered separately? | |
hasSomeColumnDefaultHide ( ) | Are some of columns hidden bydefault? | |
hasTreeViewChildrenCallback ( ) : boolean | Is tree view children callback set? | |
isFilterActive ( ) : boolean | Is filter active? | |
isMultiSortEnabled ( ) : boolean | Tell wether DataGrid can be sorted by multiple columns | |
isPaginated ( ) : boolean | Tell whether Grid is paginated | |
isSortable ( ) : boolean | Tell whether DataGrid is sortable | |
isTreeView ( ) : boolean | Is tree view set? | |
redrawItem ( integer $id, mixed $primary_where_column = NULL ) : void | Redraw just one row via ajax | |
reload ( $snippets = [] ) : void | Redraw $this | |
removeAction ( string $key ) : void | Remove action | |
removeColumn ( string $key ) : void | Remove column | |
removeFilter ( string $key ) : void | Remove filter | |
render ( ) : void | Render template | |
resetExportsLinks ( ) | ||
saveSessionData ( string $key, mixed $value ) : void | Save session data - just if it is enabled | |
sendNonEmptyFiltersInPayload ( |
||
setAutoSubmit ( boolean $auto = TRUE ) | Tell grid filters to by submitted automatically | |
setCollapsibleOuterFilters ( boolean $collapsible_outer_filters = TRUE ) | ||
setColumnReset ( boolean $reset = TRUE ) : static | ||
setColumnsExportOrder ( array $order ) | Columns order may be different for export and normal grid | |
setColumnsHideable ( ) : static | Order Grid to set columns hideable. | |
setColumnsOrder ( array $order ) : static | Set order of datagrid columns | |
setColumnsSummary ( array $columns, callable $rowCallback = NULL ) : |
Set columns to be summarized in the end. | |
setDataSource ( Ublaboo\DataGrid\DataSource\IDataSource | array | DibiFluent | |
Set Grid data source | |
setDefaultFilter ( array $default_filter, boolean $use_on_reset = TRUE ) : static | If we want to sent some initial filter | |
setDefaultPerPage ( $count ) : static | Set default "items per page" value in pagination select | |
setDefaultSort ( array $sort ) : static | Set default sorting | |
setDefaultSort ( array $sort, boolean $use_on_reset = TRUE ) : static | Set default sorting | |
setFilter ( array $filter ) : static | Set filter values (force - overwrite user data) | |
setFilterActive ( ) | Tell that filter is active from whatever reasons return static | |
setFilterContainerDefaults ( |
||
setFilterContainerDefaults ( |
||
setItemsDetail ( mixed $detail = TRUE, boolean | null $primary_where_column = NULL ) : |
Items can have thair detail - toggled | |
setItemsDetailForm ( callable $callable_set_container ) : static | ||
setItemsPerPageList ( array $items_per_page_list, $include_all = TRUE ) : static | Set options of select "items_per_page" | |
setMultiSortEnabled ( boolean $multiSort = TRUE ) : void | Enable multi-sorting capability | |
setOuterFilterRendering ( boolean $out = TRUE ) : static | Should be datagrid filters rendered separately? | |
setPagination ( boolean $do ) : static | Order Grid to "be paginated" | |
setPrimaryKey ( string $primary_key ) : static | By default ID, you can change that | |
setRefreshUrl ( boolean $refresh = TRUE ) : static | Should datagrid refresh url using history API? | |
setRememberState ( boolean $remember = TRUE ) : static | Should datagrid remember its filters/pagination/etc using session? | |
setRowCallback ( callable $callback ) : static | Each row can be modified with user callback | |
setSomeColumnDefaultHide ( boolean $default_hide ) | Some of datagrid columns is hidden by default | |
setSortable ( boolean $sortable = TRUE ) : static | Set grido to be sortable | |
setSortableHandler ( string $handler = 'sort!' ) : static | Set sortable handle | |
setStrictSessionFilterValues ( boolean $strict = TRUE ) | ||
setTemplateFile ( string $template_file ) : static | Set custom template file to render | |
setTranslator ( Nette\Localization\ITranslator $translator ) : static | Set datagrid translator | |
setTreeView ( callable $get_children_callback, string | callable $tree_view_has_children_column = 'has_children' ) : static | Setting tree view | |
treeViewChildrenCallback ( mixed $item ) : boolean | ||
useHappyComponents ( boolean | null $use = NULL ) : void | boolean | Tell datagrid wheteher to use or not happy components |
Method | Description | |
---|---|---|
addActionCheck ( string $key ) | Check whether given key already exists in $this->filters | |
addColumn ( string $key, |
||
addColumnCheck ( string $key ) | Check whether given key already exists in $this->columns | |
addFilterCheck ( string $key ) | Check whether given key already exists in $this->filters | |
addToExports ( |
Add export to array | |
createSorting ( array $sort, callable $sort_callback = NULL ) : void | ||
createSorting ( array $sort, callable | null $sort_callback ) : void |
public __construct ( Nette\ComponentModel\IContainer $parent = NULL, string $name = NULL ) | ||
$parent | Nette\ComponentModel\IContainer | |
$name | string |
public addActionCallback ( string $key, string $name, $callback = NULL ) : |
||
$key | string | |
$name | string | |
return |
protected addActionCheck ( string $key ) | ||
$key | string |
protected addColumnCheck ( string $key ) | ||
$key | string |
public addExportCsv ( string $text, string $csv_file_name, string | null $output_encoding = NULL, string | null $delimiter = NULL, boolean $include_bom = FALSE ) : |
||
$text | string | |
$csv_file_name | string | |
$output_encoding | string | null | |
$delimiter | string | null | |
$include_bom | boolean | |
return |
public addExportCsvFiltered ( string $text, string $csv_file_name, string | null $output_encoding = NULL, string | null $delimiter = NULL, boolean $include_bom = FALSE ) : |
||
$text | string | |
$csv_file_name | string | |
$output_encoding | string | null | |
$delimiter | string | null | |
$include_bom | boolean | |
return |
protected addFilterCheck ( string $key ) | ||
$key | string |
public addGroupAction ( string $title, array $options = [] ) : |
||
$title | string | |
$options | array | |
return |
public addGroupSelectAction ( string $title, array $options = [] ) : |
||
$title | string | |
$options | array | |
return |
public addGroupTextAction ( string $title ) : |
||
$title | string | |
return |
public addGroupTextareaAction ( string $title ) : |
||
$title | string | |
return |
public addInlineAdd ( ) : |
||
return |
public addInlineEdit ( $primary_where_column = NULL ) : |
||
return |
protected addToExports ( |
||
$export | ||
return |
public allowRowsGroupAction ( callable $condition ) : void | ||
$condition | callable | |
return | void |
public allowRowsInlineEdit ( callable $condition ) : void | ||
$condition | callable | |
return | void |
public assableFilters ( ) : |
||
return | $this->filters === Filter\Filter[] |
public canHideColumns ( ) : boolean | ||
return | boolean |
public createComponentFilter ( ) : Nette\Application\UI\Form | ||
return | Nette\Application\UI\Form |
public createComponentPaginator ( ) : |
||
return |
public deleteSessionData ( $key ) : void | ||
return | void |
public deleteSesssionData ( $key ) : void | ||
return | void |
public filterSucceeded ( Nette\Application\UI\Form $form ) : void | ||
$form | Nette\Application\UI\Form | |
return | void |
public findDefaultFilter ( ) : void | ||
return | void |
public findDefaultPerPage ( ) : void | ||
return | void |
public findDefaultSort ( ) : void | ||
return | void |
public findSessionValues ( ) : void | ||
return | void |
public getColumns ( ) : Column\IColumn[] | ||
return | Column\IColumn[] |
public getColumnsCount ( ) : integer | ||
return | integer |
public getColumnsSummary ( ) : |
||
return |
public getDataSource ( ) : Ublaboo\DataGrid\DataSource\IDataSource | null | ||
return | Ublaboo\DataGrid\DataSource\IDataSource | null |
public getFilterSubmitButton ( ) : |
||
return |
public getGroupActionCollection ( ) : |
||
return |
public getInlineAdd ( ) : |
||
return |
public getInlineEdit ( ) : |
||
return |
public getItemDetailForm ( ) : |
||
return |
public getItemsDetail ( ) : array | ||
return | array |
public getItemsPerPageList ( ) : array | ||
return | array |
public getOriginalTemplateFile ( ) : string | ||
return | string |
public getPaginator ( ) : null | |
||
return | null | |
public getParent ( ) : Nette\Application\UI\PresenterComponent | ||
return | Nette\Application\UI\PresenterComponent |
public getPrimaryKey ( ) : string | ||
return | string |
public getSessionData ( string $key = NULL, $default_value = NULL ) : mixed | ||
$key | string | |
return | mixed |
public getSessionSectionName ( ) : string | ||
return | string |
public getSortNext ( |
||
$column | ||
return | array |
public getSortableHandler ( ) : string | ||
return | string |
public getTemplateFile ( ) : static | ||
return | static |
public getTranslator ( ) : Nette\Localization\ITranslator | ||
return | Nette\Localization\ITranslator |
public handleExport ( integer $id ) : void | ||
$id | integer | Key for particular export class in array $this->exports |
return | void |
public handleGetChildren ( integer $parent ) : void | ||
$parent | integer | |
return | void |
public handleGetItemDetail ( mixed $id ) : void | ||
$id | mixed | |
return | void |
public handleHideColumn ( string $column ) : void | ||
$column | string | |
return | void |
public handlePage ( integer $page ) : void | ||
$page | integer | |
return | void |
public handleRefreshState ( ) : void | ||
return | void |
public handleResetColumnFilter ( string $key ) : void | ||
$key | string | |
return | void |
public handleResetFilter ( ) : void | ||
return | void |
public handleShowAllColumns ( ) : void | ||
return | void |
public handleShowColumn ( string $column ) : void | ||
$column | string | |
return | void |
public handleShowDefaultColumns ( ) : void | ||
return | void |
public handleSort ( array $sort ) : void | ||
$sort | array | |
return | void |
public hasCollapsibleOuterFilters ( ) : boolean | ||
return | boolean |
public hasColumnsSummary ( ) : boolean | ||
return | boolean |
public hasGroupActions ( ) : boolean | ||
return | boolean |
public hasOuterFilterRendering ( ) : boolean | ||
return | boolean |
public hasSomeColumnDefaultHide ( ) |
public hasTreeViewChildrenCallback ( ) : boolean | ||
return | boolean |
public isMultiSortEnabled ( ) : boolean | ||
return | boolean |
public isPaginated ( ) : boolean | ||
return | boolean |
public isSortable ( ) : boolean | ||
return | boolean |
public removeAction ( string $key ) : void | ||
$key | string | |
return | void |
public removeColumn ( string $key ) : void | ||
$key | string | |
return | void |
public removeFilter ( string $key ) : void | ||
$key | string | |
return | void |
public sendNonEmptyFiltersInPayload ( |
||
$filters | ||
return | void |
public setAutoSubmit ( boolean $auto = TRUE ) | ||
$auto | boolean |
public setCollapsibleOuterFilters ( boolean $collapsible_outer_filters = TRUE ) | ||
$collapsible_outer_filters | boolean |
public setColumnReset ( boolean $reset = TRUE ) : static | ||
$reset | boolean | |
return | static |
public setColumnsExportOrder ( array $order ) | ||
$order | array |
public setColumnsHideable ( ) : static | ||
return | static |
public setColumnsOrder ( array $order ) : static | ||
$order | array | |
return | static |
public setColumnsSummary ( array $columns, callable $rowCallback = NULL ) : |
||
$columns | array | |
$rowCallback | callable | |
return |
public setDataSource ( Ublaboo\DataGrid\DataSource\IDataSource | array | DibiFluent | |
||
$source | Ublaboo\DataGrid\DataSource\IDataSource | array | DibiFluent | |
|
return | static |
public setDefaultFilter ( array $default_filter, boolean $use_on_reset = TRUE ) : static | ||
$default_filter | array | |
$use_on_reset | boolean | |
return | static |
public setDefaultPerPage ( $count ) : static | ||
$count | ||
return | static |
public setDefaultSort ( array $sort ) : static | ||
$sort | array | |
return | static |
public setDefaultSort ( array $sort, boolean $use_on_reset = TRUE ) : static | ||
$sort | array | |
$use_on_reset | boolean | |
return | static |
public setFilterActive ( ) |
public setFilterContainerDefaults ( |
||
$container | ||
$values | array |
public setItemsDetailForm ( callable $callable_set_container ) : static | ||
$callable_set_container | callable | |
return | static |
public setItemsPerPageList ( array $items_per_page_list, $include_all = TRUE ) : static | ||
$items_per_page_list | array | |
return | static |
public setMultiSortEnabled ( boolean $multiSort = TRUE ) : void | ||
$multiSort | boolean | |
return | void |
public setOuterFilterRendering ( boolean $out = TRUE ) : static | ||
$out | boolean | |
return | static |
public setPagination ( boolean $do ) : static | ||
$do | boolean | |
return | static |
public setPrimaryKey ( string $primary_key ) : static | ||
$primary_key | string | |
return | static |
public setRefreshUrl ( boolean $refresh = TRUE ) : static | ||
$refresh | boolean | |
return | static |
public setRememberState ( boolean $remember = TRUE ) : static | ||
$remember | boolean | |
return | static |
public setRowCallback ( callable $callback ) : static | ||
$callback | callable | |
return | static |
public setSomeColumnDefaultHide ( boolean $default_hide ) | ||
$default_hide | boolean |
public setSortable ( boolean $sortable = TRUE ) : static | ||
$sortable | boolean | |
return | static |
public setSortableHandler ( string $handler = 'sort!' ) : static | ||
$handler | string | |
return | static |
public setStrictSessionFilterValues ( boolean $strict = TRUE ) | ||
$strict | boolean |
public setTemplateFile ( string $template_file ) : static | ||
$template_file | string | |
return | static |
public setTranslator ( Nette\Localization\ITranslator $translator ) : static | ||
$translator | Nette\Localization\ITranslator | |
return | static |
public treeViewChildrenCallback ( mixed $item ) : boolean | ||
$item | mixed | |
return | boolean |
protected Action[],Ublaboo\DataGrid\Column $actions | ||
return |
protected bool $collapsible_outer_filters | ||
return | boolean |
protected ColumnsSummary,Ublaboo\DataGrid $columnsSummary | ||
return |
public bool $default_filter_use_on_reset | ||
return | boolean |
protected Export[],Ublaboo\DataGrid\Export $exports | ||
return |
protected SubmitButton,Ublaboo\DataGrid\Filter|NULL $filter_submit_button | ||
return |
protected Filter[],Ublaboo\DataGrid\Filter $filters | ||
return |
public static string $form_method | ||
return | string |
protected SessionSection,Nette\Http $grid_session | ||
return |
protected GroupActionCollection,Ublaboo\DataGrid\GroupAction $group_action_collection | ||
return |
protected InlineEdit,Ublaboo\DataGrid\InlineEdit $inlineAdd | ||
return |
protected InlineEdit,Ublaboo\DataGrid\InlineEdit $inlineEdit | ||
return |
protected ItemDetail,Ublaboo\DataGrid\Column $items_detail | ||
return |
protected bool $some_column_default_hide | ||
return | boolean |
public bool $strict_entity_property | ||
return | boolean |
public bool $strict_session_filter_values | ||
return | boolean |
protected ToolbarButton[],Ublaboo\DataGrid\Toolbar $toolbar_buttons | ||
return |
protected callable $tree_view_children_callback | ||
return | callable |
protected callable $tree_view_has_children_callback | ||
return | callable |
protected string $tree_view_has_children_column | ||
return | string |