src/Alg/Tree/Menu/Converter.php
protected static function buildMenuListFromOutlines( $lines, &$container )
	{
		foreach( $lines as $line )
		{
			if( isset( $line['outlines'] ) && count( $line['outlines'] ) )
			{
				if( isset ( $line['url'] ) )
					$item	= new ADT_Tree_Menu_Item( $line['url'], $line['text'] );
				else
					$item	= new ADT_Tree_Menu_List( $line['text'] );
				self::buildMenuListFromOutlines( $line['outlines'], $item );
				$container->addChild( $item );
			}
			else
			{
				$item	= new ADT_Tree_Menu_Item( $line['url'], $line['text'] );
				$container->addChild( $item );
			}
		}
	}
protected static function buildMenuListFromOutlines( $lines, &$container )
	{
		foreach( $lines as $line )
		{
			if( isset( $line['outlines'] ) && count( $line['outlines'] ) )
			{
				if( isset ( $line['url'] ) )
					$item	= new ADT_Tree_Menu_Item( $line['url'], $line['text'] );
				else
					$item	= new ADT_Tree_Menu_List( $line['text'] );
				self::buildMenuListFromOutlines( $line['outlines'], $item );
				$container->addChild( $item );
			}
			else
			{
				$item	= new ADT_Tree_Menu_Item( $line['url'], $line['text'] );
				$container->addChild( $item );
			}
		}
	}
protected static function buildMenuListFromOutlines ( $ lines , & $ container ) { foreach ( $ lines as $ line ) { if ( isset ( $ line [ 'outlines' ] ) && count ( $ line [ 'outlines' ] ) ) { if ( isset ( $ line [ 'url' ] ) ) $ item = new ADT_Tree_Menu_Item ( $ line [ 'url' ] , $ line [ 'text' ] ) ; else $ item = new ADT_Tree_Menu_List ( $ line [ 'text' ] ) ; self :: buildMenuListFromOutlines ( $ line [ 'outlines' ] , $ item ) ; $ container -> addChild ( $ item ) ; } else { $ item = new ADT_Tree_Menu_Item ( $ line [ 'url' ] , $ line [ 'text' ] ) ; $ container -> addChild ( $ item ) ; } } }
Adds Tree Menu Items from OPML Outlines into a given Tree Menu List recursively.
@access		public
@static
@param		array				$outlines		Outline Array from OPML Parser
@param		ADT_Tree_Menu_List	$container		Current working Menu Container, a Tree Menu List initially.
@return		void
Adds Tree Menu Items from OPML Outlines into a given Tree Menu List recursively .