views_handler_field_markup.inc in Views (for Drupal 7) 6.3
File
handlers/views_handler_field_markup.inc
View source
<?php
class views_handler_field_markup extends views_handler_field {
function construct() {
parent::construct();
$this->format = $this->definition['format'];
$this->additional_fields = array();
if (!is_numeric($this->format)) {
$this->additional_fields['format'] = array(
'field' => $this->format,
);
}
}
function render($values) {
$value = $this
->get_value($values);
if (!is_numeric($this->format)) {
$format = $this
->get_value($values, 'format');
}
else {
$format = $this->format;
}
if ($value) {
$value = str_replace('<!--break-->', '', $value);
return check_markup($value, $format, FALSE);
}
}
function element_type($none_supported = FALSE, $default_empty = FALSE, $inline = FALSE) {
if ($inline) {
return 'span';
}
if (isset($this->definition['element type'])) {
return $this->definition['element type'];
}
return 'div';
}
}