function FieldPluginBase::render_trim_text

Trim the field down to the specified length.

1 call to FieldPluginBase::render_trim_text()
FieldPluginBase::render_text in drupal/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php
Perform an advanced text render for the item.

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php, line 1289
Definition of Drupal\views\Plugin\views\field\FieldPluginBase.

Class

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

Namespace

Drupal\views\Plugin\views\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.
    $this->definition['element type'] = 'span';
  }
  return views_trim_text($alter, $value);
}