public function treeGetChildsByIdAction()
 {
     $document = Document::getById($this->_getParam("node"));
     $documents = array();
     if ($document->hasChilds()) {
         $limit = intval($this->_getParam("limit"));
         if (!$this->_getParam("limit")) {
             $limit = 100000000;
         }
         $offset = intval($this->_getParam("start"));
         $list = new Document_List();
         $list->setCondition("parentId = ?", $document->getId());
         $list->setOrderKey("index");
         $list->setOrder("asc");
         $list->setLimit($limit);
         $list->setOffset($offset);
         $childsList = $list->load();
         foreach ($childsList as $childDocument) {
             // only display document if listing is allowed for the current user
             if ($childDocument->isAllowed("list")) {
                 $documents[] = $this->getTreeNodeConfig($childDocument);
             }
         }
     }
     if ($this->_getParam("limit")) {
         $this->_helper->json(array("total" => $document->getChildAmount(), "nodes" => $documents));
     } else {
         $this->_helper->json($documents);
     }
     $this->_helper->json(false);
 }