original_string: public function add($text, $url=null, $type=null, $shorttext=null, $key=null, pix_icon $icon=null) {
          $node = parent::add($text, $url, $type, $shorttext, $key, $icon);
          $node->add_class('root_node');
          return $node;
      }
code: public function add($text, $url=null, $type=null, $shorttext=null, $key=null, pix_icon $icon=null) {
          $node = parent::add($text, $url, $type, $shorttext, $key, $icon);
          $node->add_class('root_node');
          return $node;
      }
code_tokens: public function add ( $ text , $ url = null , $ type = null , $ shorttext = null , $ key = null , pix_icon $ icon = null ) { $ node = parent :: add ( $ text , $ url , $ type , $ shorttext , $ key , $ icon ) ; $ node -> add_class ( 'root_node' ) ; return $ node ; }
docstring: Override the parent function so that we can add preceeding hr's and set a
  root node class against all first level element
  
  It does this by first calling the parent's add method {@link navigation_node::add()}
  and then proceeds to use the key to set class and hr
  
  @param string $text text to be used for the link.
  @param string|moodle_url $url url for the new node
  @param int $type the type of node navigation_node::TYPE_*
  @param string $shorttext
  @param string|int $key a key to access the node by.
  @param pix_icon $icon An icon that appears next to the node.
  @return navigation_node with the new node added to it.
docstring_tokens: Override the parent function so that we can add preceeding hr s and set a root node class against all first level element