truncateResult = $this->filterManager->truncateFilter( $value, ['length' => $length, 'etc' => $etc, 'breakWords' => $breakWords] ); return $this->truncateResult->getValue(); } /** * Add line breaks and truncate value * * @param string $value * @return array */ public function getFormattedOption($value) { $remainder = ''; $this->truncateString($value, 55, '', $remainder); $result = [ 'value' => nl2br($this->truncateResult->getValue()), 'remainder' => nl2br($this->truncateResult->getRemainder()) ]; return $result; } }