parent = $parent; return $this; } /** * Function to get parent * @return Vtiger_Record_Model */ public function getParent() { return $this->parent; } /** * Function to set Field instance * @param Vtiger_Field_Model */ public function setFieldInstance($fieldModel) { $this->fieldInstance = $fieldModel; return $this; } /** * Function to get Field instance * @return Vtiger_Field_Model */ public function getFieldInstance() { return $this->fieldInstance; } /** * Function to get Old value of this Field * @return */ public function getOldValue() { return $this->getDisplayValue($this->get('prevalue')); } /** * Function to get new(updated) value of this Field * @return */ public function getNewValue() { return $this->getDisplayValue($this->get('postvalue')); } /** * Function to get name * @return */ public function getName() { return $this->getFieldInstance()->get('label'); } /** * Function to get Display Value * @param $value * @return */ public function getDisplayValue($value) { return $this->getFieldInstance()->getDisplayValue($value); } /** * Function returns the module name of the field * @return */ public function getModuleName() { return $this->getParent()->getParent()->getModule()->getName(); } }