static function getDefinitionTree($definition_id, $parent_id = null)
 {
     $nextlevel = new DataDefinitionDetailCollection(new DataDefinitionDetail());
     $sh = new SearchHandler($nextlevel, false);
     $sh->addConstraint(new Constraint('data_definition_id', '=', $definition_id));
     if (empty($parent_id)) {
         $sh->addConstraint(new Constraint('parent_id', 'is', 'NULL'));
     } else {
         $sh->addConstraint(new Constraint('parent_id', '=', $parent));
     }
     $sh->setOrderby('position');
     $nextlevel->load($sh);
     return $nextlevel;
 }
Ejemplo n.º 2
0
 public function data_definition_details()
 {
     if (!$this->checkParams('id')) {
         $this->dataError();
         sendBack();
     }
     $this->view->set('items', DataDefinitionDetailCollection::getDefinitionTree($this->_data['id']));
     //		$this->view->set('page_title',$this->getPageName());
 }