You are here

function twilio_twiml_create in Twilio 7

Create 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_create()
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 184
Twilio TwiML module

Code

function twilio_twiml_create($values = FALSE) {

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

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