예제 #1
0
 /**
  * Loads all children if they are not loaded yet
  */
 protected function loadChildren()
 {
     if (!$this->loaded && $this->getId() > 0) {
         $this->children = $this->mapper->findPathTree($this->getId());
         $this->loaded = true;
     }
 }
 /**
  * Simple method which posts back all sections aka paths.
  * 
  * @return JSONResponse|XMLResponse
  * 
  * @NoAdminRequired
  */
 public function sections()
 {
     $response = $this->pathMapper->findPathTree();
     return new JSONResponse($response);
 }