First of all it is extremely cool that you created your own modifier!
I don't know of any examples where a modifier is passed a value. I'm sure it could be done, but you might have to modify:
Code:
/**
* Call for Flexy modifier from AView class
*
* @param string $callMethod Name of method to call
* @param string $expr Exression to modify
*
* @return string
*/
protected function flexyModifierCall($callMethod, $expr)
{
$callMethod = 'flexyModifier' . ucfirst($callMethod);
return method_exists($this, $callMethod) ? $this->$callMethod($expr) : '';
}
Reading through the method above, I think it would have to have another argument added, like:
protected function flexyModifierCall($callMethod, $expr, $params = NULL)
Then you could pass it some parameters and use those in your call. But I am just not sure that it is wired that way. Probably I would just create a method that shortened the text with 2 arguments, value and length.