public function revertField($field)
    {
        if ($this->isModifiedField($field)) {
            $this->setFieldValue($field, $this->getOldFieldValue($field)); // revert field value

            if (($key = array_search($field, $this->modified_fields)) !== false) {
                unset($this->modified_fields[$field]); // remove modified flag
            }
        }
    }
public function revertField($field)
    {
        if ($this->isModifiedField($field)) {
            $this->setFieldValue($field, $this->getOldFieldValue($field)); // revert field value

            if (($key = array_search($field, $this->modified_fields)) !== false) {
                unset($this->modified_fields[$field]); // remove modified flag
            }
        }
    }
public function revertField ( $ field ) { if ( $ this -> isModifiedField ( $ field ) ) { $ this -> setFieldValue ( $ field , $ this -> getOldFieldValue ( $ field ) ) ; // revert field value if ( ( $ key = array_search ( $ field , $ this -> modified_fields ) ) !== false ) { unset ( $ this -> modified_fields [ $ field ] ) ; // remove modified flag } } }
Revert field to old value.

@param $field
Revert field to old value .