Ver Mensaje Individual
  #11 (permalink)  
Antiguo 29/04/2013, 09:09
wilmer30
 
Fecha de Ingreso: enero-2010
Mensajes: 491
Antigüedad: 14 años, 3 meses
Puntos: 12
Respuesta: Recuperar en un Container para Zend_Navigation

puse a funcionar el ejemplo de esta manera:
Código PHP:
Ver original
  1. $repo = $this->em->getRepository('Application\Entity\Menu');
  2.         $arrayTree = $repo->childrenHierarchy();
  3.         $this->render_nested_set($arrayTree);
  4. ......
  5.  
  6.     private function render_nested_set($coll)
  7.     {
  8.         $output = "\n";
  9.         foreach ($coll as $key=>$record) {
  10.             $output .= "<li>".$record->getMenu();
  11.             if ($record->getChildren()!=null) {
  12.                 $output .= "\n".$this->render_nested_set($record->getChildren());
  13.             }
  14.             $output .= "</li>\n";
  15.         }
  16.         return $output."</ul>\n";
  17.     }
y me dice:
Cita:
Fatal error: Call to a member function getMenu() on a non-object in C:\xampp\htdocs\bcbtram\application\modules\defaul t\controllers\IndexController.php on line 233
y en mi modelo si existe public function getMenu() {...}.