Passing an object in symfony 1.4 using include_partial ()?

I want an object in my partial. I want to use object variables and functions in partial. Is it possible to pass an object to the include_partial () function? Or how can I access an object in partial? I do not want to set the object in a symfony request.

+4
source share
1 answer

In this way:

include_partial('moduleName/partialName', array( 'object1' => $Object1, 'object2' => $Object2 )); 

then in partial use $ object1, $ object2, etc.

+3
source

Source: https://habr.com/ru/post/1434361/


All Articles