Пример #1
0
 /**
  * @param SearchModel $search
  *
  * @return \Doctrine\ORM\Query
  */
 public function getQueryFromSearch(SearchModel $search)
 {
     $nodes = $this->locationManager->getChildren($search->getLocation(), true, 'name', 'ASC', true);
     $results = [];
     foreach ($nodes as $location) {
         $results[] = $location->getId();
     }
     return $this->repository->getQueryFromSearch($search, $results);
 }
Пример #2
0
 public function testgetChildren()
 {
     $location = $this->getMock('Appartin\\CoreBundle\\Entity\\Location');
     $this->repository->expects($this->once())->method('getChildren')->with($this->equalTo($location));
     $this->manager->getChildren($location);
 }