function FieldPluginBase::render_trim_text in Views (for Drupal 7) 8.3
Trim the field down to the specified length.
1 call to FieldPluginBase::render_trim_text()
- FieldPluginBase::render_text in lib/
Drupal/ views/ Plugin/ views/ field/ FieldPluginBase.php - Perform an advanced text render for the item.
File
- 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\fieldCode
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);
}