开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜