Public Member Functions | |
| __construct ($id) | |
| Constructs a new AnewtGridCellRenderer. | |
| render_cell ($data) | |
| Renders the cell. | |
Public Attributes | |
| $id | |
| The id of this cell renderer. | |
Protected Member Functions | |
| create_td ($value) | |
| Create a XHTML cell based on the provided value. | |
| fetch_value_from_data ($data) | |
| Fetch default value from the row data, based on the cell renderer id. | |
Private Attributes | |
| $_column | |
| Reference to the parent column. | |
This grid renderer just renders the data as a cell (without any special effects).
Definition at line 15 of file cell.lib.php.
| AnewtGridCellRenderer::__construct | ( | $ | id | ) |
Constructs a new AnewtGridCellRenderer.
| $id | The id for this cell renderer. It will be used to match against the row data in the grid. |
Reimplemented from AnewtContainer.
Definition at line 27 of file cell.lib.php.
| AnewtGridCellRenderer::render_cell | ( | $ | data | ) |
Renders the cell.
| $data | Data to pack into the cell |
Reimplemented in AnewtGridCellRendererHyperlink, AnewtGridCellRendererCount, and AnewtGridCellRendererDate.
Definition at line 46 of file cell.lib.php.
| AnewtGridCellRenderer::create_td | ( | $ | value | ) | [protected] |
Create a XHTML cell based on the provided value.
This method handles a variety of data types easibly convertible to strings, and takes the highlight property of the AnewtGridColumn into account when rendering into a HTML <td> table cell. You can use this method to render the final result in custom cell renderers (after doing done your custom formatting based on the row data).
| $value | Value to render |
Definition at line 69 of file cell.lib.php.
| AnewtGridCellRenderer::fetch_value_from_data | ( | $ | data | ) | [protected] |
Fetch default value from the row data, based on the cell renderer id.
This method is used internally to fetch the cell data from the row data object. Both associative arrays and AnewtContainer objects are handled. Which value is retrieved depends on the id of the cell renderer; if you did not instantiate an AnewtGridCellRenderer yourself, this is will be the same as the column id.
Custom AnewtGridCellRenderer subclasses may use this method as a convenience method to get data from the row object prior to further processing or formatting.
| $data | Row data |
id Definition at line 104 of file cell.lib.php.
1.5.9