public function whereDescendantOf($id, $boolean = 'and', $not = FALSE,
        $andSelf = FALSE
    )
    {
        if (NestedSet::isNode($id)) {
            $data = $id->getBounds();
        }
        else {
            $data = $this->model->newNestedSetQuery()
                                ->getPlainNodeData($id, TRUE);
        }

        // Don't include the node
        if (!$andSelf) {
            ++$data[0];
        }

        return $this->whereNodeBetween($data, $boolean, $not);
    }
public function whereDescendantOf($id, $boolean = 'and', $not = FALSE,
        $andSelf = FALSE
    )
    {
        if (NestedSet::isNode($id)) {
            $data = $id->getBounds();
        }
        else {
            $data = $this->model->newNestedSetQuery()
                                ->getPlainNodeData($id, TRUE);
        }

        // Don't include the node
        if (!$andSelf) {
            ++$data[0];
        }

        return $this->whereNodeBetween($data, $boolean, $not);
    }
public function whereDescendantOf ( $ id , $ boolean = 'and' , $ not = FALSE , $ andSelf = FALSE ) { if ( NestedSet :: isNode ( $ id ) ) { $ data = $ id -> getBounds ( ) ; } else { $ data = $ this -> model -> newNestedSetQuery ( ) -> getPlainNodeData ( $ id , TRUE ) ; } // Don't include the node if ( ! $ andSelf ) { ++ $ data [ 0 ] ; } return $ this -> whereNodeBetween ( $ data , $ boolean , $ not ) ; }
Add constraint statement to descendants of specified node.

@since 2.0

@param mixed $id
@param string $boolean
@param bool $not
@param bool $andSelf

@return $this
Add constraint statement to descendants of specified node .