Ejemplo n.º 1
0
 /**
  * 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;
 }
Ejemplo n.º 2
0
 /**
  * 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;
 }