You are here

public function UCXF_Value::delete in Extra Fields Checkout Pane 7

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

Removes value from db

@access public

Return value

boolean

File

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

Class

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

Code

public function delete() {
  $result = FALSE;
  if (!$this->is_new) {
    $result = db_delete('uc_extra_fields_values')
      ->condition('element_id', $this->element_id)
      ->condition('element_type', $this->element_type)
      ->condition('field_id', $this->field_id)
      ->execute();
    if ($result) {
      unset(self::$loaded_values[$this->element_id][$this->element_type][$this->field_id]);
    }
  }
  return $result;
}