function eck__entity__delete_form in Entity Construction Kit (ECK) 7
Same name and namespace in other branches
- 7.3 eck.entity.inc \eck__entity__delete_form()
- 7.2 eck.entity.inc \eck__entity__delete_form()
1 string reference to 'eck__entity__delete_form'
- eck__entity__delete in ./
eck.entity.inc - Callback function for the delete functionality
File
- ./
eck.entity.inc, line 246 - All the menus, pages, and functionality related to administering entities.
Code
function eck__entity__delete_form($form, &$form_state, $entity_type, $bundle, $id) {
$entities = entity_load($entity_type->name, array(
$id,
));
$form['entity'] = array(
'#type' => 'value',
'#value' => $entities[$id],
);
$form['entity_type'] = array(
'#type' => 'value',
'#value' => $entity_type,
);
$form['bundle'] = array(
'#type' => 'value',
'#value' => $bundle,
);
$form['submit_redirect'] = array(
'#type' => 'value',
'#value' => "admin/structure/eck/{$entity_type->name}/{$bundle->name}",
);
$message = t("Are you sure that you want to delete %id", array(
"%id" => $id,
));
$caption = t("This action cannot be undone.");
return confirm_form($form, $message, "admin/structure/eck/{$entity_type->name}", $caption, t('Delete'));
}