class Clip extends BaseFilter

Clip provides the 'clip' twig filter.

Attempts to trim a string to length

{{ article.abstract|clip(100) }}

Methods

__construct()

No description

getFilterOptions()

No description

object
getDI()

Return default dependency injector

string
getFilterName()

Return the filter name

string
handle(string $str, int $len = 100)

Handle filter response

Details

in BaseFilter at line 13
__construct()

in BaseFilter at line 22
getFilterOptions()

in BaseFilter at line 31
object getDI()

Return default dependency injector

Return Value

object Phalcon\Di

at line 19
string getFilterName()

Return the filter name

Return Value

string

at line 30
string handle(string $str, int $len = 100)

Handle filter response

Parameters

string $str
int $len

Return Value

string