2
// $Id: views_handler_field_markup.inc,v 1.3 2009/01/08 20:01:00 merlinofchaos Exp $
5
* A handler to run a field through check_markup, using a companion
8
* - format: (REQUIRED) The field in this table used to control the format
9
* such as the 'format' field in the node, which goes with the
12
* @ingroup views_field_handlers
14
class views_handler_field_markup extends views_handler_field {
16
* Constructor; calls to base object constructor.
18
function construct() {
21
$this->format = $this->definition['format'];
23
$this->additional_fields = array();
24
if (!is_numeric($this->format)) {
25
$this->additional_fields['format'] = array('field' => $this->format);
29
function render($values) {
30
$value = $values->{$this->field_alias};
31
$format = is_numeric($this->format) ? $this->format : $values->{$this->aliases['format']};
32
return check_markup($value, $format, FALSE);
35
function element_type() {
36
if (isset($this->definition['element type'])) {
37
return $this->definition['element type'];