开发者

Symfony: How to include custom functions in the view

开发者 https://www.devze.com 2023-03-02 09:58 出处:网络
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/controll

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

精彩评论

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

关注公众号