public function FieldPluginBase::renderTrimText

Trim the field down to the specified length.

1 call to FieldPluginBase::renderTrimText()
FieldPluginBase::renderText 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 1294
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

public function renderTrimText($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 static::trimText($alter, $value);
}