00001 <?php 00002 00014 class views_handler_field_markup extends views_handler_field { 00018 function construct() { 00019 parent::construct(); 00020 00021 $this->format = $this->definition['format']; 00022 00023 $this->additional_fields = array(); 00024 if (is_array($this->format)) { 00025 $this->additional_fields['format'] = $this->format; 00026 } 00027 } 00028 00029 function render($values) { 00030 $value = $this->get_value($values); 00031 if (is_array($this->format)) { 00032 $format = $this->get_value($values, 'format'); 00033 } 00034 else { 00035 $format = $this->format; 00036 } 00037 if ($value) { 00038 $value = str_replace('<!--break-->', '', $value); 00039 return check_markup($value, $format, ''); 00040 } 00041 } 00042 00043 function element_type($none_supported = FALSE, $default_empty = FALSE, $inline = FALSE) { 00044 if ($inline) { 00045 return 'span'; 00046 } 00047 00048 if (isset($this->definition['element type'])) { 00049 return $this->definition['element type']; 00050 } 00051 00052 return 'div'; 00053 } 00054 }