Symfony: How to include custom functions in the view
I have a populated list, and I want to utilize a custom function to shorten row names which are too long to display. The rows from the list are generated from an object passed from the action/controller. How/where do I include m开发者_运维知识库y custom function for to achieve the above mentioned purpose?
Any advice appreciated.
I guess you need helpers:
http://www.symfony-project.org/book/1_2/07-Inside-the-View-Layer
Use this function in _toString method of the object to display its name.
精彩评论