You are here

public function UCXF_Value::save in Extra Fields Checkout Pane 6.2

Same name and namespace in other branches
  1. 7 class/UCXF_Value.class.php \UCXF_Value::save()

Save value to database @access public

Return value

boolean

File

class/UCXF_Value.class.php, line 329
Contains the UCXF_Value class.

Class

UCXF_Value
This class is used to keep track of all field values currently loaded.

Code

public function save() {
  $update = array();
  if (!$this->is_new) {
    $update = array(
      'element_id',
      'element_type',
      'field_id',
    );
  }
  $data = $this
    ->toArray();
  $result = drupal_write_record('uc_extra_fields_values', $data, $update);
  if ($result !== FALSE) {
    $this->is_new = FALSE;
  }
  return $result;
}