You are here

function twilio_twiml_update in Twilio 7

Update a TwiML entry in the DB.

Parameters

array $values: A keyed array containing all the information we need.

Return value

bool TRUE or FALSE

1 call to twilio_twiml_update()
twilio_twiml_manager_form_submit in twilio_twiml/twilio_twiml.admin.inc
Submit callback for TwiML Manager form.

File

twilio_twiml/twilio_twiml.module, line 210
Twilio TwiML module

Code

function twilio_twiml_update($values = FALSE) {

  // If no values, return FALSE.
  if (!$values) {
    return FALSE;
  }

  // Create the record.
  return db_update('twilio_twiml')
    ->fields(array(
    'name' => $values['name'],
    'description' => $values['description'],
    'data' => $values['data'],
  ))
    ->condition('twiml_id', $values['twiml_id'], '=')
    ->execute();
}