02/02/2014, 08:06
|
| | Fecha de Ingreso: enero-2010
Mensajes: 491
Antigüedad: 14 años, 10 meses Puntos: 12 | |
error de variable en zf2 Hola:
Quisiera entender el problema de este error:
File:
/var/www/wilmer/vendor/zendframework/zendframework/library/Zend/Mvc/Router/Http/TreeRouteStack.php:313
Message:
Route with name "user" not found
Stack trace:
#0 /var/www/wilmer/vendor/zendframework/zendframework/library/Zend/View/Helper/Url.php(102): Zend\Mvc\Router\Http\TreeRouteStack->assemble(Array, Array)
#1 [internal function]: Zend\View\Helper\Url->__invoke('user', Array)
#2 /var/www/wilmer/vendor/zendframework/zendframework/library/Zend/View/Renderer/PhpRenderer.php(400): call_user_func_array(Object(Zend\View\Helper\Url), Array)
#3 /var/www/wilmer/module/Application/view/application/index/index.phtml(8): Zend\View\Renderer\PhpRenderer->__call('url', Array)
......
en el IndexController tengo esto:
public function indexAction()
{
$users = $this->getObjectManager()->getRepository('\Application\Entity\User')->findAll();
return new ViewModel(array('users' => $users));
}
y en la vista esto:
<a href="<?php echo $this->url('user', array('action'=>'add'));?>">Add User</a>
Gracias. |