function commerce_product_ui_product_type_delete_form in Commerce Core 7
Form callback: confirmation form for deleting a product type.
Parameters
$product_type: The product type array to be deleted.
See also
1 string reference to 'commerce_product_ui_product_type_delete_form'
- commerce_product_ui_product_type_delete_form_wrapper in modules/
product/ includes/ commerce_product_ui.types.inc - Form callback wrapper: confirmation form for deleting a product type.
File
- modules/
product/ includes/ commerce_product_ui.forms.inc, line 197 - Forms for creating / editing and deleting products.
Code
function commerce_product_ui_product_type_delete_form($form, &$form_state, $product_type) {
$form_state['product_type'] = $product_type;
// Ensure this include file is loaded when the form is rebuilt from the cache.
$form_state['build_info']['files']['form'] = drupal_get_path('module', 'commerce_product_ui') . '/includes/commerce_product_ui.forms.inc';
$form['#submit'][] = 'commerce_product_ui_product_type_delete_form_submit';
$form = confirm_form($form, t('Are you sure you want to delete the %name product type?', array(
'%name' => $product_type['name'],
)), 'admin/commerce/products/types', '<p>' . t('This action cannot be undone.') . '</p>', t('Delete'), t('Cancel'), 'confirm');
return $form;
}