public function FieldHandlerInterface::renderText in Drupal 10
Same name and namespace in other branches
- 8 core/modules/views/src/Plugin/views/field/FieldHandlerInterface.php \Drupal\views\Plugin\views\field\FieldHandlerInterface::renderText()
- 9 core/modules/views/src/Plugin/views/field/FieldHandlerInterface.php \Drupal\views\Plugin\views\field\FieldHandlerInterface::renderText()
Performs an advanced text render for the item.
This is separated out as some fields may render lists, and this allows each item to be handled individually.
Parameters
array $alter: The alter array of options to use.
- max_length: Maximum length of the string, the rest gets truncated.
- word_boundary: Trim only on a word boundary.
- ellipsis: Show an ellipsis (…) at the end of the trimmed string.
- html: Make sure that the html is correct.
Return value
string|\Drupal\Component\Render\MarkupInterface The rendered output. If the output is safe it will be wrapped in an object that implements MarkupInterface. If it is empty or unsafe it will be a string.
File
- core/
modules/ views/ src/ Plugin/ views/ field/ FieldHandlerInterface.php, line 240
Class
- FieldHandlerInterface
- Base field handler that has no options and renders an unformatted field.
Namespace
Drupal\views\Plugin\views\fieldCode
public function renderText($alter);