Location: PHPKode > projects > AModules3 > amodules-3.0.1/mini-apps/03-DocAssistant/ProjectStructure.php
<?php
/*
 * Created on 14.04.2006 by *Camper*
 */
class ProjectStructure extends TreeView{
	private $project_id;
	
	function init(){
		parent::init();
		$this
			->display('ajax', 'name', '', true)
			
			->setSource('member m', 'id', 'parent_id')
		;
		if(isset($_GET['id']))$this->project_id=$_GET['id'];
		$this->memorize('project_id', $this->project_id);
		$this->dq->where('project_id = '.$this->recall('project_id'));
		$this->dq->where("type = 'class'");
		$this->dq->order('id');
		$this->dq->where('version_id = '.$this->api->getProjectVersion($this->recall('project_id')));
		$this->collapseAll();
	}
	function format_ajax($field){
		$this->current_row['caption']=$this->api->getMemberLink($this->current_row[$field['name']],
			$this->current_row[$this->id_field], true);
	}
}
Return current item: AModules3