define anonymous functions inside volt


There is possible to write php anonymous functions inside volt? something like

{{ widget.render("GridView", [ 'data': function($model){return $model->getTitle()}]) }}


edited Mar '16

I guess not and there shouldn't be, views are not for putting logic into it. Just add custom function to volt if you need it.

edited Apr '16

well, is not really meant for putting logic into it, but more to pass the value as a function and on server I can pass anything I want on that $model. Just being curious if there is something part of volt before I try to implement something myself.