function theme_twilio_twiml_list in Twilio 7
Theme function for TwiML lists.
1 theme call to theme_twilio_twiml_list()
- twilio_twiml_manager_form in twilio_twiml/
twilio_twiml.admin.inc - TwiML Manager form.
File
- twilio_twiml/
twilio_twiml.module, line 57 - Twilio TwiML module
Code
function theme_twilio_twiml_list($variables) {
if (empty($variables['twiml_list'])) {
return FALSE;
}
$rows = array();
foreach ($variables['twiml_list'] as $row) {
$edit = l(t('Edit'), TWILIO_ADMIN_PATH . '/twiml/' . $row->twiml_id);
$delete = l(t('Delete'), TWILIO_ADMIN_PATH . '/twiml_delete/' . $row->twiml_id);
$url = $GLOBALS['base_url'] . '/twilio/twiml/' . $row->twiml_id;
$rows[] = array(
$row->name,
$row->description,
$url,
$edit . ' | ' . $delete,
);
}
$variables = array(
'header' => array(
'Name',
'Description',
'URL',
'Operations',
),
'rows' => $rows,
);
return theme('table', $variables);
}