function eck__bundle__delete_form in Entity Construction Kit (ECK) 7.3
Same name and namespace in other branches
- 7 eck.bundle.inc \eck__bundle__delete_form()
- 7.2 eck.bundle.inc \eck__bundle__delete_form()
Bundle delete form callback.
1 string reference to 'eck__bundle__delete_form'
- eck__entity__menu in ./
eck.entity.inc - Entity related menu items.
File
- ./
eck.bundle.inc, line 399
Code
function eck__bundle__delete_form($form, &$form_state, $entity_type_name, $bundle_name) {
$path = eck__entity_type__path();
$entity_type = entity_type_load($entity_type_name);
$bundle = bundle_load($entity_type_name, $bundle_name);
$form['entity_type'] = array(
'#type' => 'value',
'#value' => $entity_type,
);
$form['bundle'] = array(
'#type' => 'value',
'#value' => $bundle,
);
$form['submit_redirect'] = array(
'#type' => 'value',
'#value' => "{$path}/{$entity_type->name}",
);
$message = t('Are you sure that you want to delete the bundle %bundle?', array(
'%bundle' => $bundle->label,
));
$caption = t("All of the data (entities) associated with this bundle\n will be deleted. This action cannot be undone.");
return confirm_form($form, $message, "{$path}/{$entity_type->name}", $caption, t('Delete'));
}