src/UI/HTML/Index.php
public function renderTree( $tree = NULL ){														//  
		$list	= array();																			//  
		if( is_null( $tree ) )																		//  
			$tree	= $this->tree;																	//  
		foreach( $tree as $item ){
			$link	= UI_HTML_Tag::create( 'a', $item->label, array( 'href' => "#".$item->id ) );	//  
			$attributes		= array( 'class' => 'level-'.$item->level );							//  
			$subtree		= $this->renderTree( $item->children );									//  
			$list[]	= UI_HTML_Elements::ListItem( $link.$subtree, 0, $attributes );					//  
		}
		return UI_HTML_Tag::create( 'ul', $list, array( 'class' => 'index-tree' ) );				//  
	}
public function renderTree( $tree = NULL ){														//  
		$list	= array();																			//  
		if( is_null( $tree ) )																		//  
			$tree	= $this->tree;																	//  
		foreach( $tree as $item ){
			$link	= UI_HTML_Tag::create( 'a', $item->label, array( 'href' => "#".$item->id ) );	//  
			$attributes		= array( 'class' => 'level-'.$item->level );							//  
			$subtree		= $this->renderTree( $item->children );									//  
			$list[]	= UI_HTML_Elements::ListItem( $link.$subtree, 0, $attributes );					//  
		}
		return UI_HTML_Tag::create( 'ul', $list, array( 'class' => 'index-tree' ) );				//  
	}
public function renderTree ( $ tree = NULL ) { //   $ list = array ( ) ; //   if ( is_null ( $ tree ) ) //   $ tree = $ this -> tree ; //   foreach ( $ tree as $ item ) { $ link = UI_HTML_Tag :: create ( 'a' , $ item -> label , array ( 'href' => "#" . $ item -> id ) ) ; //   $ attributes = array ( 'class' => 'level-' . $ item -> level ) ; //   $ subtree = $ this -> renderTree ( $ item -> children ) ; //   $ list [ ] = UI_HTML_Elements :: ListItem ( $ link . $ subtree , 0 , $ attributes ) ; //   } return UI_HTML_Tag :: create ( 'ul' , $ list , array ( 'class' => 'index-tree' ) ) ; //   }
Generates nested lists of parsed heading structure.
@access		public
@param		array		$tree		Tree of heading structure, default: parsed tree
@return		string		HTML of nested lists containing heading structure.
Generates nested lists of parsed heading structure .