Elgg  Version 3.0
Public Member Functions | List of all members
Elgg\Views\TableColumn\CallableColumn Class Reference

Table column rendered by a function. More...

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

Public Member Functions

 __construct (callable $renderer, $heading)
 Constructor. More...
 
 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.
} More...
 
 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.
} More...
 

Detailed Description

Table column rendered by a function.

Definition at line 9 of file CallableColumn.php.

Constructor & Destructor Documentation

Elgg\Views\TableColumn\CallableColumn::__construct ( callable  $renderer,
  $heading 
)

Constructor.

Parameters
callable$rendererRendering function
string$headingHeading

Definition at line 27 of file CallableColumn.php.

Member Function Documentation

Elgg\Views\TableColumn\CallableColumn::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.
}

Implements Elgg\Views\TableColumn.

Definition at line 42 of file CallableColumn.php.

Elgg\Views\TableColumn\CallableColumn::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.
}

Implements Elgg\Views\TableColumn.

Definition at line 35 of file CallableColumn.php.


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