I am very confused how to use partialLoop
I am currently using
foreach ($childrenTodos as $childTodo) { echo $this->partial('todos/_row.phtml', array('todo' => $childTodo)); }
$childrenTodos is Doctrine\ORM\PersistantCollection , $childTodo is Application\Models\Todo
I tried to do
echo $this->partialLoop('todos/_row.phtml', $childrenTodos) ->setObjectKey('Application\Models\Todo');
But in partial, when I try to access the properties / functions of my Todo class, I cannot force them to always end with the undefined method call Zend_View::myFunction() , when I use $this->myFunction() in partial or if I try $this->todo->getName() , I get a "Member function call getName () for a non-object." How to use partialLoops?
zend-framework zend-view
Jiew meng
source share