original_string: public function build_flat_navigation_list(flat_navigation $nodes, $showdivider = false, $label = '') {
          if ($this->showinflatnavigation) {
              $indent = 0;
              if ($this->type == self::TYPE_COURSE || $this->key === self::COURSE_INDEX_PAGE) {
                  $indent = 1;
              }
              $flat = new flat_navigation_node($this, $indent);
              $flat->set_showdivider($showdivider, $label);
              $nodes->add($flat);
          }
          foreach ($this->children as $child) {
              $child->build_flat_navigation_list($nodes, false);
          }
      }
code: public function build_flat_navigation_list(flat_navigation $nodes, $showdivider = false, $label = '') {
          if ($this->showinflatnavigation) {
              $indent = 0;
              if ($this->type == self::TYPE_COURSE || $this->key === self::COURSE_INDEX_PAGE) {
                  $indent = 1;
              }
              $flat = new flat_navigation_node($this, $indent);
              $flat->set_showdivider($showdivider, $label);
              $nodes->add($flat);
          }
          foreach ($this->children as $child) {
              $child->build_flat_navigation_list($nodes, false);
          }
      }
code_tokens: public function build_flat_navigation_list ( flat_navigation $ nodes , $ showdivider = false , $ label = '' ) { if ( $ this -> showinflatnavigation ) { $ indent = 0 ; if ( $ this -> type == self :: TYPE_COURSE || $ this -> key === self :: COURSE_INDEX_PAGE ) { $ indent = 1 ; } $ flat = new flat_navigation_node ( $ this , $ indent ) ; $ flat -> set_showdivider ( $ showdivider , $ label ) ; $ nodes -> add ( $ flat ) ; } foreach ( $ this -> children as $ child ) { $ child -> build_flat_navigation_list ( $ nodes , false ) ; } }
docstring: Walk the tree building up a list of all the flat navigation nodes.
  
  @param flat_navigation $nodes List of the found flat navigation nodes.
  @param boolean $showdivider Show a divider before the first node.
  @param string $label A label for the collection of navigation links.
docstring_tokens: Walk the tree building up a list of all the flat navigation nodes .