original_string: public function hide(array $typestohide = null) {
          if ($typestohide === null || in_array($this->type, $typestohide)) {
              $this->display = false;
              if ($this->has_children()) {
                  foreach ($this->children as $child) {
                      $child->hide($typestohide);
                  }
              }
          }
      }
code: public function hide(array $typestohide = null) {
          if ($typestohide === null || in_array($this->type, $typestohide)) {
              $this->display = false;
              if ($this->has_children()) {
                  foreach ($this->children as $child) {
                      $child->hide($typestohide);
                  }
              }
          }
      }
code_tokens: public function hide ( array $ typestohide = null ) { if ( $ typestohide === null || in_array ( $ this -> type , $ typestohide ) ) { $ this -> display = false ; if ( $ this -> has_children ( ) ) { foreach ( $ this -> children as $ child ) { $ child -> hide ( $ typestohide ) ; } } } }
docstring: Hides the node and any children it has.
  
  @since Moodle 2.5
  @param array $typestohide Optional. An array of node types that should be hidden.
  If null all nodes will be hidden.
  If an array is given then nodes will only be hidden if their type mtatches an element in the array.
  e.g. array(navigation_node::TYPE_COURSE) would hide only course nodes.
docstring_tokens: Hides the node and any children it has .