You are here

function farm_asset_type_form_delete_confirm in farmOS 7

Asset type delete form.

Parameters

array $form: The form array.

array $form_state: The form state array.

string $farm_asset_type: The farm asset type.

Return value

array Returns a form array.

1 string reference to 'farm_asset_type_form_delete_confirm'
farm_asset_menu in modules/farm/farm_asset/farm_asset.module
Implements hook_menu().

File

modules/farm/farm_asset/farm_asset.admin.inc, line 113
Farm asset admin pages.

Code

function farm_asset_type_form_delete_confirm(array $form, array &$form_state, $farm_asset_type) {
  $form['farm_asset_type'] = array(
    '#type' => 'value',
    '#value' => $farm_asset_type,
  );

  // Always provide entity id in the same form key as in the entity edit form.
  $form['farm_asset_type_id'] = array(
    '#type' => 'value',
    '#value' => entity_id('farm_asset_type', $farm_asset_type),
  );
  return confirm_form($form, t('Are you sure you want to delete asset type %title?', array(
    '%title' => entity_label('farm_asset_type', $farm_asset_type),
  )), 'farm/asset/' . entity_id('farm_asset_type', $farm_asset_type), t('This action cannot be undone.'), t('Delete'), t('Cancel'));
}