function farm_plan_consideration_delete_form in farmOS 7
Delete confirmation form.
Parameters
array $form: The form array.
array $form_state: The form state array.
$plan: The farm plan entity.
$consideration_id: The ID of the consideration record.
Return value
array Returns a form array.
1 string reference to 'farm_plan_consideration_delete_form'
- farm_plan_consideration_menu in modules/
farm/ farm_plan/ farm_plan_consideration/ farm_plan_consideration.module - Implements hook_menu().
File
- modules/
farm/ farm_plan/ farm_plan_consideration/ farm_plan_consideration.module, line 536 - Farm plan consideration module.
Code
function farm_plan_consideration_delete_form(array $form, array &$form_state, $plan, $consideration_id) {
// Store the plan in the form.
$form['plan'] = array(
'#type' => 'value',
'#value' => $plan,
);
// Load the consideration.
$consideration = farm_plan_consideration_load($consideration_id);
// Store the consideration in the form.
$form['consideration'] = array(
'#type' => 'value',
'#value' => $consideration,
);
// Build a confirmation form.
return confirm_form($form, t('Are you sure you want to delete %name?', array(
'%name' => $consideration->name,
)), 'farm/plan/' . $plan->id . '/considerations', t('This action cannot be undone.'), t('Delete'), t('Cancel'));
}