ColModifierTruncate
extends UnescapedColModifier
in package
FinalYes
Truncate the word count of a column with given word limit trailed by ellipsis symbol, with the full text in a title attribute
Table of Contents
Properties
- $word_limit : mixed
Methods
- __construct() : mixed
- modify() : string
- Modify a column value This value will be html/csv/etc encoded afterwards.
Properties
$word_limit
private
mixed
$word_limit
= 4
Methods
__construct()
public
__construct([mixed $word_limit = 4 ]) : mixed
Parameters
- $word_limit : mixed = 4
modify()
Modify a column value This value will be html/csv/etc encoded afterwards.
public
modify(mixed $val, mixed $field_name, mixed $row) : string
Parameters
- $val : mixed
-
The incoming value
- $field_name : mixed
-
The name of the field being modified
- $row : mixed
-
The full row of data
Return values
string —The modified value