php - RecursiveIteratorIterator callHasChildren() returning always true -


i use recursiveiteratoriterator class build menu.

actually i'm using zend_navigation container build main menu , breadcrumbs, doesn't suit other needs, i'm using container iterator:

$navigation = $this->view->navigation()->getcontainer(); $iterator = new recursiveiteratoriterator( $navigation, recursiveiteratoriterator::self_first); 

then know, 2 things - current level , if item has more children. first 1 can achieve getdepth() method , second 1 tried use callhaschildren(), 1 returning true, if item has not more children.

foreach ($iterator $page) {              echo $iterator->getdepth() . $iterator->callhaschildren()) . '<br />'; } 

any idea how use method?


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -