Jet\UI_dataGrid_column
This subelement of the UI_dataGrid element has a special role. Of course, it is a rederer that is in charge of a specific column of the data listing.
However, it also represents the definition of this column. Thus, it defines not only what the column title will be, but also what data key will be displayed in the column. Last but not least, it also defines whether or not the data can be sorted by the column and indicates whether the data is sorted by the column.
Dědí od Jet\UI_Renderer_Single
Overview of methods
Method | Meaning of |
---|---|
public __construct( UI_dataGrid $grid, string $name, string $title ) |
Parameters
|
public getGrid( ) : UI_dataGrid |
Returns the grid to which the column belongs. |
public getName( ) : string |
Returns the column name - its identification and data key. |
public setRenderer( callable $renderer ) : static |
Important method Sets a rederer - e.g. an anonymous function that takes care of displaying the specific content of the given column and row. The prototype function is:
function( array|object $row_item, int $row_index ) : void
|
public getRenderer( ) : callable |
Returns the renderer - see the setRenderer method. |
public getTitle( ) : string |
Returns the set column header. |
public setTitle( string $title ) : static |
Sets the column header. |
public setAllowSort( bool $allow_order_by ) : static |
Sets whether or not sorting by date column is allowed. |
public getAllowSort( ) : bool |
Indicates whether or not sorting by date column is allowed. |
public isSortByAsc( ) : bool |
Indicates whether the data is currently sorted by the given column - ascending. |
public isSortByDesc( ) : bool |
Indicates whether the data is currently sorted by the column - descending. |