While accessing variables in local function within view phtml file I get this popular error
Using $this when not in object context
I want to know is there any way by which I can bulk copy all the variables and objects in Variables container data structure of ViewModel defined in Controller, as local variables and objects to view so I can use them in local functions?
In otherwords, like someCreateVariablesFromViewModelArray method to call in phtml. Because I have lot of data in ViewModel Variables container array in Zend Framework 2.