php - How to force Zend_Navigation_Page_Mvc to generate an href -


i've come across strange issue zend_navigation_page_mvc. when try render anchor tag, url seems cached instance on page, therefore href incorrect.

to create instance in action want return to:

$request = $this->getrequest();  $back = new zend_navigation_page_mvc(     array(         'module'     => $request->getmodulename(),         'controller' => $request->getcontrollername(),         'action'     => $request->getactionname(),         'params'     => $params, // array of params pass         'label'      => 'back listings',         'class'      => 'back'     ) ); 

i store in session , later retrieve provide back button. in action instance session , assign view. in view, render navigation using echo $this->navigation(new zend_navigation(array($this->back)));

a var_dump of $this->back produces this:

object(zend_navigation_page_mvc)[132]   protected '_action' => string 'index' (length=5)   protected '_controller' => string 'specialcall' (length=11)   protected '_module' => string 'admin' (length=5)   protected '_params' =>      array (size=0)       empty   protected '_route' => null   protected '_resetparams' => boolean true   protected '_encodeurl' => boolean true   protected '_active' => boolean false   protected '_scheme' => null   protected '_hrefcache' => string '/digitallearning/admin/specialcall/view' (length=39)   protected '_label' => string 'back listings' (length=16)   protected '_fragment' => null   protected '_id' => null   protected '_class' => string 'back' (length=4)   protected '_title' => null   protected '_target' => null   protected '_accesskey' => null   protected '_rel' =>      array (size=0)       empty   protected '_rev' =>      array (size=0)       empty   protected '_order' => null   protected '_resource' => null   protected '_privilege' => null   protected '_visible' => boolean true   protected '_parent' =>      object(zend_navigation)[130]       protected '_pages' =>          array (size=1)           '00000000219cad71000000015ca8a15d' =>              &object(zend_navigation_page_mvc)[132]       protected '_index' =>          array (size=1)           '00000000219cad71000000015ca8a15d' => int 0       protected '_dirtyindex' => boolean false   protected '_properties' =>      array (size=0)       empty   protected '_customhtmlattribs' =>      array (size=0)       empty   protected '_pages' =>      array (size=0)       empty   protected '_index' =>      array (size=0)       empty   protected '_dirtyindex' => boolean false 

calling var_dump $this->back->gethref(); produces unexpected results:

string '/digitallearning/admin/specialcall/view' (length=39) 

view current action, can see _action above, it's not set action.

it appears href being taken cache (see _hrefcache above). question how can force generate href instead of taking cache?


Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -