public function belongsTo(NodeInterface $node)
	{
		parent::belongsTo($node);

		$rep = $this->sourceRepository;
		if ( ! ($rep instanceof RepositoryInterface)) {
			throw new Exception\WrongInstance($rep, 'RepositoryInterface');
		}
		$nestedSetRepository = $rep->getNestedSetRepository();
		/* @var $nestedSetRepository DoctrineRepository */
		
		$this->setRepository($nestedSetRepository);
		
		if ($this->right === null) {
			$nestedSetRepository->add($node);
		}
		$nestedSetRepository->register($node);
	}
public function belongsTo(NodeInterface $node)
	{
		parent::belongsTo($node);

		$rep = $this->sourceRepository;
		if ( ! ($rep instanceof RepositoryInterface)) {
			throw new Exception\WrongInstance($rep, 'RepositoryInterface');
		}
		$nestedSetRepository = $rep->getNestedSetRepository();
		/* @var $nestedSetRepository DoctrineRepository */
		
		$this->setRepository($nestedSetRepository);
		
		if ($this->right === null) {
			$nestedSetRepository->add($node);
		}
		$nestedSetRepository->register($node);
	}
public function belongsTo ( NodeInterface $ node ) { parent :: belongsTo ( $ node ) ; $ rep = $ this -> sourceRepository ; if ( ! ( $ rep instanceof RepositoryInterface ) ) { throw new Exception \ WrongInstance ( $ rep , 'RepositoryInterface' ) ; } $ nestedSetRepository = $ rep -> getNestedSetRepository ( ) ; /* @var $nestedSetRepository DoctrineRepository */ $ this -> setRepository ( $ nestedSetRepository ) ; if ( $ this -> right === null ) { $ nestedSetRepository -> add ( $ node ) ; } $ nestedSetRepository -> register ( $ node ) ; }
Pass the doctrine entity the nested set node belongs to
@param NodeInterface $entity
Pass the doctrine entity the nested set node belongs to