public function UCXF_Value::save in Extra Fields Checkout Pane 7
Same name and namespace in other branches
- 6.2 class/UCXF_Value.class.php \UCXF_Value::save()
Save value to database @access public
Return value
boolean
File
- class/
UCXF_Value.class.php, line 319 - 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;
}