yii use a model related function in a view

∥☆過路亽.° 提交于 2019-12-13 18:08:08

问题


I have no reputation to comment on a question, so I am making a new one. But my question is related to another question: How to convert model data objects array to dataProvider

So.... if you read the question, my doubt is:

I need to ask for help to a new thing that this subject rises. I would like to get a function result as the data of a column, but this function is inside the Friend object. Its not possible to do:

array(
    'name'=>$model->friends->getAttributeLabel('column_of_friend_model'),
    'value'=> $model->friends->takeDataFromFriendModelThatIsActuallyInOtherModel(),
),

Can someone please help!? Thanks a lot!

来源:https://stackoverflow.com/questions/24125160/yii-use-a-model-related-function-in-a-view

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!