public function getDescendants($levelLimit = 0, $includeNode = false)
	{
		$left = $this->getLeftValue();
		$right = $this->getRightValue();
		$level = $this->getLevel();

		$searchCondition = $this->repository->createSearchCondition();
		if ($includeNode) {
			$searchCondition->leftGreaterThanOrEqualsTo($left)
					->rightLessThanOrEqualsTo($right);
		} else {
			$searchCondition->leftGreaterThan($left)
					->rightLessThan($right);
		}

		if ($levelLimit < 0) {
			throw new Exception\Domain("Level limit cannot be negative in getDescendants method");
		} elseif ($levelLimit > 0) {
			$searchCondition->levelLessThanOrEqualsTo($level + $levelLimit);
		}

		$orderRule = $this->repository->createSelectOrderRule()
				->byLeftAscending();

		$descendants = $this->repository->search($searchCondition, $orderRule);
		
		return $descendants;
	}
public function getDescendants($levelLimit = 0, $includeNode = false)
	{
		$left = $this->getLeftValue();
		$right = $this->getRightValue();
		$level = $this->getLevel();

		$searchCondition = $this->repository->createSearchCondition();
		if ($includeNode) {
			$searchCondition->leftGreaterThanOrEqualsTo($left)
					->rightLessThanOrEqualsTo($right);
		} else {
			$searchCondition->leftGreaterThan($left)
					->rightLessThan($right);
		}

		if ($levelLimit < 0) {
			throw new Exception\Domain("Level limit cannot be negative in getDescendants method");
		} elseif ($levelLimit > 0) {
			$searchCondition->levelLessThanOrEqualsTo($level + $levelLimit);
		}

		$orderRule = $this->repository->createSelectOrderRule()
				->byLeftAscending();

		$descendants = $this->repository->search($searchCondition, $orderRule);
		
		return $descendants;
	}
public function getDescendants ( $ levelLimit = 0 , $ includeNode = false ) { $ left = $ this -> getLeftValue ( ) ; $ right = $ this -> getRightValue ( ) ; $ level = $ this -> getLevel ( ) ; $ searchCondition = $ this -> repository -> createSearchCondition ( ) ; if ( $ includeNode ) { $ searchCondition -> leftGreaterThanOrEqualsTo ( $ left ) -> rightLessThanOrEqualsTo ( $ right ) ; } else { $ searchCondition -> leftGreaterThan ( $ left ) -> rightLessThan ( $ right ) ; } if ( $ levelLimit < 0 ) { throw new Exception \ Domain ( "Level limit cannot be negative in getDescendants method" ) ; } elseif ( $ levelLimit > 0 ) { $ searchCondition -> levelLessThanOrEqualsTo ( $ level + $ levelLimit ) ; } $ orderRule = $ this -> repository -> createSelectOrderRule ( ) -> byLeftAscending ( ) ; $ descendants = $ this -> repository -> search ( $ searchCondition , $ orderRule ) ; return $ descendants ; }
Get array of descendant nodes
@param int $levelLimit
@param boolean $includeNode
@return array
@throws Exception\Domain
@nestedSetMethod
Get array of descendant nodes