AnewtGridColumn class

A grid column for the AnewtGridRenderer.

Class Overview

A grid column for the AnewtGridRenderer.

This is merely an object to hold some column-related properties, as well as a list of AnewtGridCellRenderer instances that do the actual rendering of data.

Public Methods

__construct($column_id, $title=null, $order=null, $visible=null)

Constructs a new AnewtGridColumn.

Parameters

$column_id

A string id to use for this column. This string can be used afterwards to show, hide or highlight the column.

$title

A string that will be used in the header row as the title for this column (optional).

$order

The order of this column (optional, defaults to null). Usually you won't need this. The default order is the order in which the columns are added to the grid.

$visible

Initial visibility for this column (optional). Usually you won't need this, but it can be useful if you're using the same grid renderer for different views on the same type of data.

add_cell_renderer($cell_renderer)

Add a cell renderer to this column.

Parameters

$cell_renderer

A AnewtGridCellRenderer instance.

See also

cell_renderer($cell_renderer_id=null)

Return the specified cell renderer.

If no name is given, the first cell renderer instance is returned.

Parameters

$cell_renderer_id

Name of the cell renderer (optional).

Return value

A AnewtGridCellRenderer instance

See also

cell_renderers()

Return all AnewtGridCellRenderer instances associated with this column.

Return value

Array of AnewtGridCellRenderer instances

See also

Private Methods

_n_cell_renderers() [private]

Returns the number of cell renderers in this column.

Return value

The number of cell renderers.

See also

Public Attributes

$id

The id of this grid column.

Private Attributes

$_cell_renderers [private]

list of cell renderers

Inheritance

Base Classes

Inherited members