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

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -