Location: PHPKode > projects > AModules3 > amodules-3.0.1/mini-apps/03-DocAssistant/Form/MemberDetails.php
<?php
/*
 * Created on 21.04.2006 by *Camper*
 */
class Form_MemberDetails extends Form{
	function init(){
		parent::init();
		$this->api->stickyGET('member_id');
		$this->api->stickyGET('id');
		$id=$_GET['member_id']==''?$_GET['id']:$_GET['member_id'];
		$member=$this->api->getItem($id);
		$this
			->addSeparator()

			->addComment("<div align=left><p>Filename: ".$member['file']."</p><p>Line: ".$member['line'].
				"</p></div>")

			->addSeparator()
			->addField('readonly', 'name', 'Name')->setNoSave()
			->addField('readonly', 'visibility', 'Visibility')//->setValueList($this->getVList())->setNoSave()
			->addField('readonly', 'declaration', 'Declaration')->setNoSave()//->setProperty('size', 80)
		;
		//adding a fields, assuming member type
		if($member['type']=='class'){
			$this
				->addField('readonly', 'extends', 'Extends')->setNoSave()
			;
		}
		$this
			->addField('text', 'description', 'Description')
				->setProperty('cols', 60)
				->setProperty('rows', 10)
			//->addComment("<div id=result>result=?</div>")
			
			->setSource('member')
			->addCondition('id', $id)
		;
		if($this->api->recall('editable')==1)$this->addSubmit('Save');
	}
	function getVList(){
		return array('public'=>'public','private'=>'private','protected'=>'protected');
	}
	function submitted(){
		if(!parent::submitted())return false;
		$this->update();
		$this->api->redirect('Projects_name_name');
	}
}
Return current item: AModules3