/** * Get root nodes * @return array */ public function getRootNodes() { $filter = new DoctrineSearchCondition(); $filter->levelEqualsTo(0); $order = new DoctrineSelectOrder(); $order->byLeftAscending(); $rootNodes = $this->nestedSetRepository->search($filter, $order); return $rootNodes; }
/** * Prepare object to be processed by garbage collector by removing it's * instance from the Doctrine Repository Array Helper object * @param EntityNodeInterface $entity */ public function free(EntityNodeInterface $entity) { $this->repository->free($entity); $this->repository = null; }