2009年4月10日星期五

[fw-mvc] Zend_Navigation_Page_Mvc and route option

Can u modify Zend_Navigation_Page_Mvc to autodiscover module, controller,
action and other params from provided route? Now I have to do this:

$page = array('route' => 'routeName');

if (isset($page['route'])) {
$defaults =
Zend_Controller_Front::getInstance()->getRouter()->getRoute($page['route'])->getDefaults();
foreach ($defaults as $key => $value) {
if (!isset($page[$key])) {
$page[$key] = $value;
}
}
}

$page = new Zend_Navigation_Page_Mvc($page);

Thank you.
--
View this message in context: http://www.nabble.com/Zend_Navigation_Page_Mvc-and-route-option-tp22993370p22993370.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: