function client_delete_confirm in Web Service Clients 7
Same name and namespace in other branches
- 6.2 clients.module \client_delete_confirm()
- 7.2 clients.connection.admin.inc \client_delete_confirm()
Form builder for confirmation of deletion of a connection or resource.
1 string reference to 'client_delete_confirm'
- clients_menu in ./
clients.module - Implementation of hook_menu()
File
- ./
clients.module, line 221 - Clients module - handles keys and service connections and provides an API for clients
Code
function client_delete_confirm(&$form_state, $type, $id) {
if ($type == 'connection') {
$service = clients_connection_load($id);
}
elseif ($type == 'resource') {
$service = clients_resource_load($id);
}
else {
/**
* @todo error
*/
$service = array();
}
$form = array();
$form['type'] = array(
'#type' => 'value',
'#value' => $type,
);
$form['cid'] = array(
'#type' => 'value',
'#value' => $id,
);
$form['name'] = array(
'#type' => 'value',
'#value' => $service->name,
);
$form['check'] = array(
'#value' => '<p>' . t('Really delete !type @service?', array(
'@service' => $service->name,
'!type' => $type,
)) . '</p>',
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Delete'),
);
return $form;
}