public function UCXF_Field::save in Extra Fields Checkout Pane 7
Same name and namespace in other branches
- 6.2 class/UCXF_Field.class.php \UCXF_Field::save()
save() Saves field in database @access public
Return value
void
1 call to UCXF_Field::save()
- UCXF_Field::edit_form_submit in class/
UCXF_Field.class.php - Submit the edit form for the item.
File
- class/
UCXF_Field.class.php, line 315 - Contains the UCXF_Field class.
Class
- UCXF_Field
- Base class for a Extra Fields Pane field
Code
public function save() {
// Prepare values
$values = $this
->to_array();
$update = array();
$sHook = 'insert';
if (!empty($this->field_id)) {
$update[] = 'field_id';
$sHook = 'update';
}
drupal_write_record('uc_extra_fields', $values, $update);
$this->field_id = $values['field_id'];
// Let other modules react on this
module_invoke_all('ucxf_field', $this, $sHook);
}