public function makeRoot()
    {
        if ($this->getLeftValue() || $this->getRightValue()) {
            throw new PropelException('Cannot turn an existing node into a root node.');
        }

        $this->setLeftValue(1);
        $this->setRightValue(2);
        $this->setLevel(0);

        return $this;
    }
public function makeRoot()
    {
        if ($this->getLeftValue() || $this->getRightValue()) {
            throw new PropelException('Cannot turn an existing node into a root node.');
        }

        $this->setLeftValue(1);
        $this->setRightValue(2);
        $this->setLevel(0);

        return $this;
    }
public function makeRoot ( ) { if ( $ this -> getLeftValue ( ) || $ this -> getRightValue ( ) ) { throw new PropelException ( 'Cannot turn an existing node into a root node.' ) ; } $ this -> setLeftValue ( 1 ) ; $ this -> setRightValue ( 2 ) ; $ this -> setLevel ( 0 ) ; return $ this ; }
Creates the supplied node as the root node.

@return     $this|ChildCategory The current object (for fluent API support)
@throws     PropelException
Creates the supplied node as the root node .