I want an object in my partial. I want to use object variables and functions in the partial. Is it possible to pass an object in include_partial() function? Or how can I access the object in partial? I dont want to set the object in symfony request.
This way:
include_partial('moduleName/partialName', array(
'object1' => $Object1,
'object2' => $Object2
));
then in the partial use $object1, $object2 etc.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.