Elgg  Version master
Public Member Functions | List of all members
Elgg\Views\TableColumn Interface Reference

A renderer for a column of table cells and a header. More...

Inheritance diagram for Elgg\Views\TableColumn:
Elgg\Views\TableColumn\CallableColumn Elgg\Views\TableColumn\ViewColumn

Public Member Functions

 renderHeading ()
 Get the rendered heading cell as HTML. More...
 
 renderCell ($item, $type, $item_vars)
 Render a value cell as HTML. More...
 

Detailed Description

A renderer for a column of table cells and a header.

Definition at line 7 of file TableColumn.php.

Member Function Documentation

Elgg\Views\TableColumn::renderCell (   $item,
  $type,
  $item_vars 
)

Render a value cell as HTML.

Cell will be auto-wrapped with a TD element if the returned string doesn't begin with "<th" or "<td".

Parameters
mixed$itemObject/row from which to pull the value
string$typeType of object
array$item_varsParameters from the listing function
Returns
string e.g. "My Great Title" or "<td>My Great Title</td>". You must filter/escape any user content.

Implemented in Elgg\Views\TableColumn\ViewColumn, and Elgg\Views\TableColumn\CallableColumn.

Elgg\Views\TableColumn::renderHeading ( )

Get the rendered heading cell as HTML.

Cell will be auto-wrapped with a TH element if the returned string doesn't begin with "<th" or "<td".

Returns
string e.g. "Title" or "<th>Title</th>". You must filter/escape any user content.

Implemented in Elgg\Views\TableColumn\ViewColumn, and Elgg\Views\TableColumn\CallableColumn.


The documentation for this interface was generated from the following file: