public function add($text, $action=null, $type=self::TYPE_CUSTOM, $shorttext=null, $key=null, pix_icon $icon=null) {
        // Create child node
        $childnode = self::create($text, $action, $type, $shorttext, $key, $icon);

        // Add the child to end and return
        return $this->add_node($childnode);
    }
public function add($text, $action=null, $type=self::TYPE_CUSTOM, $shorttext=null, $key=null, pix_icon $icon=null) {
        // Create child node
        $childnode = self::create($text, $action, $type, $shorttext, $key, $icon);

        // Add the child to end and return
        return $this->add_node($childnode);
    }
public function add ( $ text , $ action = null , $ type = self :: TYPE_CUSTOM , $ shorttext = null , $ key = null , pix_icon $ icon = null ) { // Create child node $ childnode = self :: create ( $ text , $ action , $ type , $ shorttext , $ key , $ icon ) ; // Add the child to end and return return $ this -> add_node ( $ childnode ) ; }
Adds a navigation node as a child of this node.

@param string $text
@param moodle_url|action_link $action
@param int $type
@param string $shorttext
@param string|int $key
@param pix_icon $icon
@return navigation_node
Adds a navigation node as a child of this node .