You are here

function views_handler_field::render_trim_text in Views (for Drupal 7) 6.3

Same name and namespace in other branches
  1. 6.2 handlers/views_handler_field.inc \views_handler_field::render_trim_text()
  2. 7.3 handlers/views_handler_field.inc \views_handler_field::render_trim_text()

Trim the field down to the specified length.

1 call to views_handler_field::render_trim_text()
views_handler_field::render_text in handlers/views_handler_field.inc
Perform an advanced text render for the item.

File

handlers/views_handler_field.inc, line 911

Class

views_handler_field
Base field handler that has no options and renders an unformatted field.

Code

function render_trim_text($alter, $value) {
  if (!empty($alter['strip_tags'])) {

    // NOTE: It's possible that some external fields might override the
    // element type so if someone from, say, CCK runs into a bug here,
    // this may be why =)
    $this->definition['element type'] = 'span';
  }
  return views_trim_text($alter, $value);
}