public function createNode($parentKey, $key, $label, $value, $count, $selected)
    {
        /** @var $parentNode Node|null */
        $parentNode = isset($this->nodesByKey[$parentKey]) ? $this->nodesByKey[$parentKey] : null;
        $node = new Node($this, $parentNode, $key, $label, $value, $count, $selected);
        $this->nodesByKey[$key] = $node;

        if ($parentNode === null) {
            $this->addChildNode($node);
        } else {
            $parentNode->addChildNode($node);
        }

        $this->allNodes->add($node);
    }
public function createNode($parentKey, $key, $label, $value, $count, $selected)
    {
        /** @var $parentNode Node|null */
        $parentNode = isset($this->nodesByKey[$parentKey]) ? $this->nodesByKey[$parentKey] : null;
        $node = new Node($this, $parentNode, $key, $label, $value, $count, $selected);
        $this->nodesByKey[$key] = $node;

        if ($parentNode === null) {
            $this->addChildNode($node);
        } else {
            $parentNode->addChildNode($node);
        }

        $this->allNodes->add($node);
    }
public function createNode ( $ parentKey , $ key , $ label , $ value , $ count , $ selected ) { /** @var $parentNode Node|null */ $ parentNode = isset ( $ this -> nodesByKey [ $ parentKey ] ) ? $ this -> nodesByKey [ $ parentKey ] : null ; $ node = new Node ( $ this , $ parentNode , $ key , $ label , $ value , $ count , $ selected ) ; $ this -> nodesByKey [ $ key ] = $ node ; if ( $ parentNode === null ) { $ this -> addChildNode ( $ node ) ; } else { $ parentNode -> addChildNode ( $ node ) ; } $ this -> allNodes -> add ( $ node ) ; }
Creates a new node on the right position with the right parent node.

@param string  $parentKey
@param string $key
@param string $label
@param string $value
@param integer $count
@param boolean $selected
Creates a new node on the right position with the right parent node .