Exemplo n.º 1
0
 function performReadonlyTransformation()
 {
     $field = new LookupField($this->name, $this->title, $this->source);
     $field->setValue($this->value);
     $field->setForm($this->form);
     return $field;
 }
Exemplo n.º 2
0
 function performReadonlyTransformation()
 {
     // Source and values are DataObject sets.
     $items = $this->source;
     $field = new LookupField($this->name, $this->title ? $this->title : "", $items, $this->value);
     $field->setForm($this->form);
     return $field;
 }
 public function Field($properties = array())
 {
     $fieldName = $this->labelField;
     if ($this->value) {
         $keyObj = $this->objectForKey($this->value);
         $obj = $keyObj ? $keyObj->{$fieldName} : '';
     } else {
         $obj = null;
     }
     $source = array($this->value => $obj);
     $field = new LookupField($this->name, $this->title, $source);
     $field->setValue($this->value);
     $field->setForm($this->form);
     $field->dontEscape = true;
     return $field->Field();
 }
	function performReadonlyTransformation() {
		$fieldName = $this->labelField;
		$value = ($this->getByKey($this->value)) ? $this->getByKey($this->value)->$fieldName : '';
		$source = array(
			$this->value => $value
		);
		$field = new LookupField($this->name, $this->title, $source);
		$field->setValue($this->value);
		$field->setForm($this->form);
		$field->setReadonly(true);
		return $field;
	}
Exemplo n.º 5
0
 function performReadonlyTransformation()
 {
     $fieldName = $this->labelField;
     if ($this->value) {
         $obj = $this->getByKey($this->value) ? $this->getByKey($this->value)->{$fieldName} : '';
     } else {
         $obj = null;
     }
     $source = array($this->value => $obj);
     $field = new LookupField($this->name, $this->title, $source);
     $field->setValue($this->value);
     $field->setForm($this->form);
     $field->setReadonly(true);
     return $field;
 }